[clang-tidy] Expand modular headers for PPCallbacks
authorAlexander Kornienko <alexfh@google.com>
Fri, 22 Mar 2019 13:42:48 +0000 (13:42 +0000)
committerAlexander Kornienko <alexfh@google.com>
Fri, 22 Mar 2019 13:42:48 +0000 (13:42 +0000)
commitbbc89dcb29035ad450ac0981b8f51a6cfa2aa8ba
tree49ca020bccc697a6d96f54a88cc2b9601f79d1db
parent64178fe5e9e1fe4f853079cb199dea6235adb36f
[clang-tidy] Expand modular headers for PPCallbacks

Summary:
Add a way to expand modular headers for PPCallbacks. Checks can opt-in for this
expansion by overriding the new registerPPCallbacks virtual method and
registering their PPCallbacks in the preprocessor created for this specific
purpose.

Use module expansion in the readability-identifier-naming check

Reviewers: gribozavr, usaxena95, sammccall

Reviewed By: gribozavr

Subscribers: nemanjai, mgorny, xazax.hun, kbarton, jdoerfert, cfe-commits

Tags: #clang, #clang-tools-extra

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

llvm-svn: 356750
14 files changed:
clang-tools-extra/clang-tidy/CMakeLists.txt
clang-tools-extra/clang-tidy/ClangTidy.cpp
clang-tools-extra/clang-tidy/ClangTidy.h
clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h [new file with mode: 0644]
clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
clang-tools-extra/test/CMakeLists.txt
clang-tools-extra/test/clang-tidy/Inputs/expand-modular-headers-ppcallbacks/a.h [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/Inputs/expand-modular-headers-ppcallbacks/b.h [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/Inputs/expand-modular-headers-ppcallbacks/c.h [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/Inputs/expand-modular-headers-ppcallbacks/module.modulemap [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/expand-modular-headers-ppcallbacks.cpp [new file with mode: 0644]