aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2021-05-11 20:22:58 -0700
committerArtem Dergachev <artem.dergachev@gmail.com>2021-05-13 11:25:00 -0700
commit6a079dfdc992706408f2bde84c48bf76e52c4311 (patch)
treea8e089c68297b3ce829a8098bfcd1dab9888abb7 /llvm/lib
parentdd98ea528c0c23f5fee6d3dbafc261b81cca9f0d (diff)
downloadllvm-6a079dfdc992706408f2bde84c48bf76e52c4311.zip
llvm-6a079dfdc992706408f2bde84c48bf76e52c4311.tar.gz
llvm-6a079dfdc992706408f2bde84c48bf76e52c4311.tar.bz2
[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
Diffstat (limited to 'llvm/lib')
0 files changed, 0 insertions, 0 deletions