llvm-project/clang-tools-extra
Richard 88a7508b1f [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
2022-04-08 16:06:06 -06:00
..
clang-apply-replacements [clang-tools-extra] Remove unused forward declarations (NFC) 2022-01-30 16:05:00 -08:00
clang-change-namespace Reapply "Support Attr in DynTypedNode and ASTMatchers." 2021-08-06 22:30:32 +02:00
clang-doc [clang-doc] SerializeIndex - pass Index param by constant reference 2022-02-17 13:28:02 +00:00
clang-include-fixer [clang-tools-extra][cmake] Use `GNUInstallDirs` to support custom installation dirs. 2022-01-22 20:57:21 +00:00
clang-move [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
clang-query [clang-query] Add check to prevent setting srcloc when no introspection is available. 2021-04-28 11:21:35 +01:00
clang-reorder-fields [clang-tooling] Prevent llvm::fatal_error on invalid CLI option 2021-01-29 10:15:06 +01:00
clang-tidy [clang-tidy] Deal with keyword tokens in preprocessor conditions 2022-04-08 16:06:06 -06:00
clangd Fix MSVC "not all control paths return a value" warning 2022-04-07 14:01:15 +01:00
docs [clang-tidy] Make performance-inefficient-vector-operation work on members 2022-04-08 14:17:41 +01:00
modularize [clang-tools-extra][cmake] Use `GNUInstallDirs` to support custom installation dirs. 2022-01-22 20:57:21 +00:00
pp-trace [clang][lex] Remove `PPCallbacks::FileNotFound()` 2022-02-15 09:48:25 +01:00
pseudo [pseudo] Include missing `count` in test deps. 2022-04-07 00:15:18 +02:00
test [clang-tidy] Deal with keyword tokens in preprocessor conditions 2022-04-08 16:06:06 -06:00
tool-template
unittests [libTooling] Generalize string explanation as templated metadata 2022-03-21 20:39:35 +00:00
.gitignore
CMakeLists.txt Reapply [pseudo] Move pseudoparser from clang to clang-tools-extra" 2022-03-16 01:10:55 +01:00
CODE_OWNERS.TXT
LICENSE.TXT
README.txt Replace links to archived mailing lists by links to Discourse forums 2022-03-23 10:10:20 -04:00

README.txt

//===----------------------------------------------------------------------===//
// Clang Tools repository
//===----------------------------------------------------------------------===//

Welcome to the repository of extra Clang Tools.  This repository holds tools
that are developed as part of the LLVM compiler infrastructure project and the
Clang frontend.  These tools are kept in a separate "extra" repository to
allow lighter weight checkouts of the core Clang codebase.

This repository is only intended to be checked out inside of a full LLVM+Clang
tree, and in the 'tools/extra' subdirectory of the Clang checkout.

All discussion regarding Clang, Clang-based tools, and code in this repository
should be held using the standard Clang forum:
  https://discourse.llvm.org/c/clang

Code review for this tree should take place on the standard Clang patch and
commit lists:
  http://lists.llvm.org/mailman/listinfo/cfe-commits

If you find a bug in these tools, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/