diff options
author | Martin Probst <martin@probst.io> | 2020-04-06 15:20:54 +0200 |
---|---|---|
committer | Martin Probst <martin@probst.io> | 2020-04-06 17:13:04 +0200 |
commit | 92201505cdecd8ba5795f5e33821c49dc57f0816 (patch) | |
tree | 0527074e355256be3d03644c9c3f93d4c1347f71 /clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp | |
parent | ab1fad8a3a8b8e3264c34448205061add013b8d7 (diff) | |
download | llvm-92201505cdecd8ba5795f5e33821c49dc57f0816.zip llvm-92201505cdecd8ba5795f5e33821c49dc57f0816.tar.gz llvm-92201505cdecd8ba5795f5e33821c49dc57f0816.tar.bz2 |
clang-format: [JS] handle pseudo-keywords.
Summary:
The previous change in https://reviews.llvm.org/D77311 attempted to
detect more C++ keywords. However it also precisely detected all
JavaScript keywords. That's generally correct, but many JavaScripy
keywords, e.g. `get`, are so-called pseudo-keywords. They can be used in
positions where a keyword would never be legal, e.g. in a dotted
expression:
x.type; // type is a pseudo-keyword, but can be used here.
x.get; // same for get etc.
This change introduces an additional parameter to
`IsJavaScriptIdentifier`, allowing clients to toggle whether they want
to allow `IdentifierName` tokens, i.e. pseudo-keywords.
Reviewers: krasimir
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D77548
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp')
0 files changed, 0 insertions, 0 deletions