diff options
author | Abramo Bagnara <abramo.bagnara@gmail.com> | 2010-12-10 16:29:40 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@gmail.com> | 2010-12-10 16:29:40 +0000 |
commit | 075f8f1b6bed4d1b224c74f87508534cc6392ce6 (patch) | |
tree | c928464ba32f736d3a38292dd23a6ef919ce4d1c /lib/AST/Type.cpp | |
parent | c3c0af36bac3d71f61dd758585ab307892545de4 (diff) |
Added ParenType type node.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121488 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r-- | lib/AST/Type.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 705b097212..ed05a39305 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -171,6 +171,12 @@ SplitQualType QualType::getSplitDesugaredType(QualType T) { } } +QualType QualType::IgnoreParens(QualType T) { + while (const ParenType *PT = T->getAs<ParenType>()) + T = PT->getInnerType(); + return T; +} + /// getUnqualifiedDesugaredType - Pull any qualifiers and syntactic /// sugar off the given type. This should produce an object of the /// same dynamic type as the canonical type. |