llvm-project/clang/lib/ASTMatchers
Artem Dergachev 6a079dfdc9 [ASTMatchers] Add forCallable(), a generalization of forFunction().
The new matcher additionally covers blocks and Objective-C methods.

This matcher actually makes sure that the statement truly belongs
to that declaration's body. forFunction() incorrectly reported that
a statement in a nested block belonged to the surrounding function.

forFunction() is now deprecated due to the above footgun, in favor of
forCallable(functionDecl()) when only functions need to be considered.

Differential Revision: https://reviews.llvm.org/D102213
2021-05-13 11:25:00 -07:00
..
Dynamic [ASTMatchers] Add forCallable(), a generalization of forFunction(). 2021-05-13 11:25:00 -07:00
ASTMatchFinder.cpp [ASTMatchers] Fix segfault when Action is nullptr 2021-02-05 15:17:13 +00:00
ASTMatchersInternal.cpp [ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level) 2021-04-09 00:05:36 +01:00
CMakeLists.txt
GtestMatchers.cpp