diff options
author | Craig Silverstein <csilvers2000@yahoo.com> | 2010-10-20 21:13:35 +0000 |
---|---|---|
committer | Craig Silverstein <csilvers2000@yahoo.com> | 2010-10-20 21:13:35 +0000 |
commit | 536bab452fa38692834233187ed3d49b83722cb3 (patch) | |
tree | 25b0a89f79676411aa8a006720cc21aac234ebc2 /lib/Checker/GRExprEngine.cpp | |
parent | 0ad6dc3cee4c1c62aaa1a9e5835d800aed8ab575 (diff) |
Get FunctionDecl to recurse on FunctionTypeLoc rather than
FunctionType! I didn't realize it was available, until rjmccall
pointed out that DeclaratorDecl made the typeloc available. This
makes FunctionDecl recursion *much* easier, because the typeloc can
take care of default parameters, so we no longer have to do that
separately, which means we can just do a normal type traversal instead
of this special-case WalkUp stuff we did before.
The only downside -- and it's minor -- is that because the TypeLoc
handles both the return type and the argument types, we can't recurse
on the explicit template args in the right place (which would be
between them). I do it beforehand instead. So for
int MyFunc<float>(char x);
we get callbacks in the order: float, int, char.
Reviewed by chandlerc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116945 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/GRExprEngine.cpp')
0 files changed, 0 insertions, 0 deletions