aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorRichard <legalize@xmission.com>2022-04-07 18:58:36 -0600
committerRichard <legalize@xmission.com>2022-04-08 16:06:06 -0600
commit88a7508b1fd87c7dd7f155cb1541c61f4c1f1bc8 (patch)
tree9901542d8a97e83996b1ac353a883c8b686df0ef /llvm/unittests/Support/VirtualFileSystemTest.cpp
parentde2ddc8f3146bd87152ea86b533541039541efe1 (diff)
downloadllvm-88a7508b1fd87c7dd7f155cb1541c61f4c1f1bc8.zip
llvm-88a7508b1fd87c7dd7f155cb1541c61f4c1f1bc8.tar.gz
llvm-88a7508b1fd87c7dd7f155cb1541c61f4c1f1bc8.tar.bz2
[clang-tidy] Deal with keyword tokens in preprocessor conditions
When a "keyword" token like __restrict was present in a macro condition, modernize-macro-to-enum would assert in non-release builds. However, even for a "keyword" token, calling getIdentifierInfo()->getName() would retrieve the text of the token, which is what we want. Our intention is to scan names that appear in conditional expressions in potential enum clusters and invalidate those clusters if they contain the name. Also, guard against "raw identifiers" appearing as potential enums. This shouldn't happen, but it doesn't hurt to generalize the code. Differential Revision: https://reviews.llvm.org/D123349 Fixes #54775
Diffstat (limited to 'llvm/unittests/Support/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions