diff options
author | Abramo Bagnara <abramo.bagnara@gmail.com> | 2010-12-13 22:27:55 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@gmail.com> | 2010-12-13 22:27:55 +0000 |
commit | 140a2bd77539b4537010d8cd6a0a3805ce724b3e (patch) | |
tree | b51824e0947f56787ad727c0b5ff2de08997ba11 /lib/AST/TypeLoc.cpp | |
parent | 1192fff983d1b28cf7c8dd2e3dcf50734afc6f75 (diff) |
Skip ParenType on function instantiations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121720 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/TypeLoc.cpp')
-rw-r--r-- | lib/AST/TypeLoc.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/AST/TypeLoc.cpp b/lib/AST/TypeLoc.cpp index 0ba9fc0087..c987b9bb9b 100644 --- a/lib/AST/TypeLoc.cpp +++ b/lib/AST/TypeLoc.cpp @@ -229,3 +229,11 @@ TypeSpecifierType BuiltinTypeLoc::getWrittenTypeSpec() const { return TST_unspecified; } + +TypeLoc TypeLoc::IgnoreParens() const { + TypeLoc TL = *this; + while (ParenTypeLoc* PTL = dyn_cast<ParenTypeLoc>(&TL)) + TL = PTL->getInnerLoc(); + return TL; +} + |