llvm-project/clang-tools-extra
Richard b985b6e3c1 [clang-tidy] Ignore macros defined within declarations
Modernize-macro-to-enum shouldn't try to convert macros to enums
when they are defined inside a declaration or definition, only
when the macros are defined at the top level.  Since preprocessing
is disconnected from AST traversal, match nodes in the AST and then
invalidate source ranges spanning AST nodes before issuing diagnostics.

ClangTidyCheck::onEndOfTranslationUnit is called before
PPCallbacks::EndOfMainFile, so defer final diagnostics to the
PPCallbacks implementation.

Differential Revision: https://reviews.llvm.org/D124066

Fixes #54883
2022-04-22 17:46:54 -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 [clang][lex] NFCI: Use FileEntryRef in PPCallbacks::InclusionDirective() 2022-04-14 10:46:12 +02: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] Ignore macros defined within declarations 2022-04-22 17:46:54 -06:00
clangd Revert "Revert "Revert "[clang][pp] adds '#pragma include_instead'""" 2022-04-22 16:37:20 +00:00
docs [clang-tidy] Reduce false positives for `bugprone-infinite-loop` with dependent expressions 2022-04-20 17:17:54 +02:00
modularize [clang][lex] NFCI: Use FileEntryRef in PPCallbacks::InclusionDirective() 2022-04-14 10:46:12 +02:00
pp-trace [clang][lex] NFCI: Use FileEntryRef in PPCallbacks::InclusionDirective() 2022-04-14 10:46:12 +02:00
pseudo Revert "Revert "Revert "[clang][pp] adds '#pragma include_instead'""" 2022-04-22 16:37:20 +00:00
test [clang-tidy] Ignore macros defined within declarations 2022-04-22 17:46:54 -06:00
tool-template [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
unittests [clang-tidy] Add a Standalone diagnostics mode to clang-tidy 2022-04-16 09:53:35 +01: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/