]> granicus.if.org Git - clang/commit
Teach RAV to visit parameter variable declarations of implicit functions. Fixes PR16182.
authorMichael Han <fragmentshaders@gmail.com>
Wed, 11 Sep 2013 15:53:29 +0000 (15:53 +0000)
committerMichael Han <fragmentshaders@gmail.com>
Wed, 11 Sep 2013 15:53:29 +0000 (15:53 +0000)
commit4b6730d40e7c603bd0e223d3fa8b56a0c88a324a
tree25e74149cb69ed0a2708f7125e436008659769fc
parent54272116ba68aad779fac42477013eef500ff211
Teach RAV to visit parameter variable declarations of implicit functions. Fixes PR16182.

Normally RAV visits parameter variable declarations of a function by traversing the TypeLoc of
the parameter declarations. However, for implicit functions, their parameters don't have any
TypeLoc, because they are implicit.

So for implicit functions, we visit their parameter variable declarations by traversing them through
the function declaration, and visit them accordingly.

Reviewed by Richard Smith and Manuel Klimek.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190528 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/RecursiveASTVisitor.h
unittests/ASTMatchers/ASTMatchersTest.cpp
unittests/Tooling/RecursiveASTVisitorTest.cpp
unittests/Tooling/TestVisitor.h