[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness
Florin Iucha via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 4 11:56:52 PST 2020
0x8000-0000 added a comment.
In D54943#1804291 <https://reviews.llvm.org/D54943#1804291>, @JonasToth wrote:
> In D54943#1804183 <https://reviews.llvm.org/D54943#1804183>, @0x8000-0000 wrote:
>
> > This patch does not build on top of current tree:
> >
> > /usr/bin/ld: lib/libclangTidyCppCoreGuidelinesModule.a(ConstCorrectnessCheck.cpp.o): in function `clang::tidy::cppcoreguidelines::ConstCorrectnessCheck::registerMatchers(clang::ast_matchers::MatchFinder*)':
> > /home/florin/tools/llvm-project/clang-tools-extra/clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.cpp:65: undefined reference to `clang::ast_matchers::decompositionDecl'
> > clang: error: linker command failed with exit code 1 (use -v to see invocation)
> > [2771/4997] Building CXX object tools/clang/tools/extra/clang-include-fixer/find-all-symbols/CMakeFiles/obj.findAllSymbols.dir/PragmaCommentHandler.cpp.o
> > ninja: build stopped: subcommand failed.
> >
> >
> > This is my top of the tree right now:
> >
> > b7ecf1c1c373c53183ef6ef66efbe4237ff7b96d (origin/master, origin/HEAD, master) NFC: Fix trivial typos in comments
> >
>
>
> did the changes to `clang/include/clang/ASTMatchers/ASTMatchers.h` and `clang/lib/ASTMatchers/Dynamic/Registry.cpp` apply? They provide the `decompositionDecl` matcher. It seems odd, they are not available :/
This is the result of applying the patch as e-mailed:
~/tools/llvm-project$ patch -p0 < /tmp/D54943.236101.patch
patching file clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp
patching file clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
patching file clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
patching file clang/lib/Analysis/ExprMutationAnalyzer.cpp
patching file clang/lib/ASTMatchers/Dynamic/Registry.cpp
patching file clang/include/clang/ASTMatchers/ASTMatchers.h
patching file clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-const-correctness-values.cpp
patching file clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-const-correctness-transform-values.cpp
patching file clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-const-correctness-transform-pointer-as-values.cpp
patching file clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-const-correctness-pointer-as-values.cpp
patching file clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-const-correctness-cxx17.cpp
patching file clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-const-correctness.rst
patching file clang-tools-extra/docs/ReleaseNotes.rst
patching file clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
patching file clang-tools-extra/clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.h
patching file clang-tools-extra/clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.cpp
patching file clang-tools-extra/clang-tidy/cppcoreguidelines/CMakeLists.txt
patching file clang-tools-extra/CMakeLists.txt
No rejection that I can see.
~/tools/llvm-project$ ag decompositionDecl
clang-tools-extra/clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.cpp
67: unless(has(decompositionDecl()))))
clang/include/clang/ASTMatchers/ASTMatchers.h
318:extern const internal::VariadicAllOfMatcher<DecompositionDecl> decompositionDecl;
clang/lib/ASTMatchers/Dynamic/Registry.cpp
197: REGISTER_MATCHER(decompositionDecl);
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54943/new/
https://reviews.llvm.org/D54943
More information about the cfe-commits
mailing list