[ASTMatchers] extract public matchers from const-analysis into own patch
authorJonas Toth <development@jonas-toth.eu>
Sun, 13 Sep 2020 17:30:56 +0000 (19:30 +0200)
committerJonas Toth <development@jonas-toth.eu>
Tue, 15 Sep 2020 19:07:30 +0000 (21:07 +0200)
commit69f98311ca42127df92527b6fc3be99841a15f12
tree00ddd35de66deaf81ace8d826968bc596118763a
parent583c8ce30c12511a814a1db2923b9809f2a15c54
[ASTMatchers] extract public matchers from const-analysis into own patch

The analysis for const-ness of local variables required a view generally useful
matchers that are extracted into its own patch.

They are decompositionDecl and forEachArgumentWithParamType, that works
for calls through function pointers as well.

This is a reupload of https://reviews.llvm.org/D72505, that already landed,
but had to be reverted due to a GCC crash on powerpc
(https://reviews.llvm.org/rG4c48ea68e491cb42f1b5d43ffba89f6a7f0dadc4)

Because this took a long time to adress, i decided to redo this patch and
have a clean workflow.
I try to coordinate with someone that has a PPC to apply this patch and
test for the crash. If everything is fine, I intend to just commit.
If the crash is still happening, i hope to at least find the cause.

Differential Revision: https://reviews.llvm.org/D87588
clang/docs/LibASTMatchersReference.html
clang/include/clang/ASTMatchers/ASTMatchers.h
clang/lib/ASTMatchers/Dynamic/Registry.cpp
clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp