diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2015-08-24 19:50:45 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2015-08-24 19:50:45 +0000 |
| commit | 6c61288716aa0e2a405df1fac443ae2c7b533004 (patch) | |
| tree | b8f3eb1d5abb566b7c37e03db1442b1c62a62fda /clang/tools/libclang | |
| parent | bbede731a5b2b81aaa33c4590e5d1ab12346050c (diff) | |
| download | bcm5719-llvm-6c61288716aa0e2a405df1fac443ae2c7b533004.tar.gz bcm5719-llvm-6c61288716aa0e2a405df1fac443ae2c7b533004.zip | |
[libclang] For convenience to clients, make sure that nullability and __kindof annotations do not hide
the underlying type.
rdar://22063577
llvm-svn: 245867
Diffstat (limited to 'clang/tools/libclang')
| -rw-r--r-- | clang/tools/libclang/CXType.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/tools/libclang/CXType.cpp b/clang/tools/libclang/CXType.cpp index 1318e86b555..6fd7bc31258 100644 --- a/clang/tools/libclang/CXType.cpp +++ b/clang/tools/libclang/CXType.cpp @@ -101,6 +101,11 @@ CXType cxtype::MakeCXType(QualType T, CXTranslationUnit TU) { CXTypeKind TK = CXType_Invalid; if (TU && !T.isNull()) { + // Handle attributed types as the original type + if (auto *ATT = T->getAs<AttributedType>()) { + return MakeCXType(ATT->getModifiedType(), TU); + } + ASTContext &Ctx = cxtu::getASTUnit(TU)->getASTContext(); if (Ctx.getLangOpts().ObjC1) { QualType UnqualT = T.getUnqualifiedType(); |

