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.
Paths
| Differential D72505
[ASTMatchers] extract public matchers from const-analysis into own patch ClosedPublic Authored by JonasToth on Jan 10 2020, 6:51 AM.
Details Summary The analysis for const-ness of local variables required a view generally useful They are decompositionDecl and forEachArgumentWithParamType, that works
Diff Detail
Event Timeline
Comment Actions LGTM aside from a testing request.
This revision is now accepted and ready to land.Jan 10 2020, 8:37 AM Closed by commit rG4c48ea68e491: [ASTMatchers] extract public matchers from const-analysis into own patch (authored by JonasToth). · Explain WhyJan 11 2020, 10:26 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 237338 clang/docs/LibASTMatchersReference.html
clang/include/clang/ASTMatchers/ASTMatchers.h
clang/lib/ASTMatchers/Dynamic/Registry.cpp
clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
|
if (const auto *Value = dyn_cast_or_null<ValueDecl>(Call->getCalleeDecl())) { ... }