summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Comment.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-12-05 01:23:43 +0000
committerReid Kleckner <reid@kleckner.net>2013-12-05 01:23:43 +0000
commit0503a870a94c28ab32fa461e175f8cb387c8718e (patch)
treefa28b29965ee5c660e774fb67830aa8fd3b73e57 /clang/lib/AST/Comment.cpp
parentd33ff74b196c38ff414773d39899514a9c9dd8ed (diff)
downloadbcm5719-llvm-0503a870a94c28ab32fa461e175f8cb387c8718e.tar.gz
bcm5719-llvm-0503a870a94c28ab32fa461e175f8cb387c8718e.zip
Add an AdjustedType sugar node for adjusting calling conventions
Summary: In general, this type node can be used to represent any type adjustment that occurs implicitly without losing type sugar. The immediate use of this is to adjust the calling conventions of member function pointer types without breaking template instantiation. Fixes PR17996. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2332 llvm-svn: 196451
Diffstat (limited to 'clang/lib/AST/Comment.cpp')
-rw-r--r--clang/lib/AST/Comment.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/Comment.cpp b/clang/lib/AST/Comment.cpp
index f24a23d34c5..e60eed9630c 100644
--- a/clang/lib/AST/Comment.cpp
+++ b/clang/lib/AST/Comment.cpp
@@ -251,6 +251,11 @@ void DeclInfo::fill() {
TL = PointerTL.getPointeeLoc().getUnqualifiedLoc();
continue;
}
+ // Look through adjusted types.
+ if (AdjustedTypeLoc ATL = TL.getAs<AdjustedTypeLoc>()) {
+ TL = ATL.getOriginalLoc();
+ continue;
+ }
if (BlockPointerTypeLoc BlockPointerTL =
TL.getAs<BlockPointerTypeLoc>()) {
TL = BlockPointerTL.getPointeeLoc().getUnqualifiedLoc();
OpenPOWER on IntegriCloud