[PATCH] D13001: [libclang] Handle AutoType in clang_getTypeDeclaration
Sergey Kalinichev via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 20 01:52:03 PDT 2015
skalinichev created this revision.
skalinichev added a subscriber: cfe-commits.
Now that auto type is fixed by D11976, it also makes sense to support it in clang_getTypeDeclaration.
I couldn't find any existing tests for this method, so no tests added...
http://reviews.llvm.org/D13001
Files:
tools/libclang/CXType.cpp
Index: tools/libclang/CXType.cpp
===================================================================
--- tools/libclang/CXType.cpp
+++ tools/libclang/CXType.cpp
@@ -411,7 +411,13 @@
D = cast<TemplateSpecializationType>(TP)->getTemplateName()
.getAsTemplateDecl();
break;
-
+
+ case Type::Auto:
+ TP = cast<AutoType>(TP)->getDeducedType().getTypePtrOrNull();
+ if (TP)
+ goto try_again;
+ break;
+
case Type::InjectedClassName:
D = cast<InjectedClassNameType>(TP)->getDecl();
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13001.35194.patch
Type: text/x-patch
Size: 586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150920/064cfcb1/attachment.bin>
More information about the cfe-commits
mailing list