This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] fix non-null assertion operator recognition.
ClosedPublic

Authored by mprobst on May 15 2017, 1:27 AM.

Details

Summary

getIdentifierInfo() includes all keywords, whereas non-null assertion
operators should only be recognized after non-keywords or pseudo keywords.
Ideally this should list all tokens that clang-format recognizes as a keyword,
but that are pseudo or no keywords in JS. For the time being, just recognize
the specific bits users ran into (namespace in this case).

Diff Detail

Repository
rL LLVM

Event Timeline

mprobst created this revision.May 15 2017, 1:27 AM
djasper accepted this revision.May 15 2017, 1:28 AM
This revision is now accepted and ready to land.May 15 2017, 1:28 AM

A test case might be useful.

This revision was automatically updated to reflect the committed changes.