diff options
author | John McCall <rjmccall@apple.com> | 2009-10-24 08:00:42 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-10-24 08:00:42 +0000 |
commit | ba6a9bd384df475780be636ca45bcef5c5bbd19f (patch) | |
tree | 5a424cd2045611749ab24e8da7d7d872f3f9d5f8 /lib/Frontend/RewriteObjC.cpp | |
parent | 3eefb1c4bd2c562e43f25e0dba657bb32361dd14 (diff) |
Preserve type source information in TypedefDecls. Preserve it across
template instantiation. Preserve it through PCH. Show it off to the indexer.
I'm healthily ignoring the vector type cases because we don't have a sensible
TypeLoc implementation for them anyway.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84994 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/RewriteObjC.cpp')
-rw-r--r-- | lib/Frontend/RewriteObjC.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Frontend/RewriteObjC.cpp b/lib/Frontend/RewriteObjC.cpp index 0ea0a58d52..a00326267e 100644 --- a/lib/Frontend/RewriteObjC.cpp +++ b/lib/Frontend/RewriteObjC.cpp @@ -2609,10 +2609,12 @@ Stmt *RewriteObjC::RewriteMessageExpr(ObjCMessageExpr *Exp) { // typedef struct objc_object Protocol; QualType RewriteObjC::getProtocolType() { if (!ProtocolTypeDecl) { + DeclaratorInfo *DInfo + = Context->getTrivialDeclaratorInfo(Context->getObjCIdType()); ProtocolTypeDecl = TypedefDecl::Create(*Context, TUDecl, SourceLocation(), &Context->Idents.get("Protocol"), - Context->getObjCIdType()); + DInfo); } return Context->getTypeDeclType(ProtocolTypeDecl); } |