From 5ea957701641c5d6f4186957a1fed0968a67fc4f Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 9 Mar 2013 00:54:27 +0000 Subject: Add TagDecl::hasNameForLinkage(), which is true if the tag is non-anonymous or is defined in a typedef of itself. llvm-svn: 176742 --- clang/lib/Sema/SemaCodeComplete.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaCodeComplete.cpp') diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index e485b356db9..78d8518b234 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/lib/Sema/SemaCodeComplete.cpp @@ -1476,7 +1476,7 @@ static const char *GetCompletionTypeString(QualType T, // Anonymous tag types are constant strings. if (const TagType *TagT = dyn_cast(T)) if (TagDecl *Tag = TagT->getDecl()) - if (!Tag->getIdentifier() && !Tag->getTypedefNameForAnonDecl()) { + if (!Tag->hasNameForLinkage()) { switch (Tag->getTagKind()) { case TTK_Struct: return "struct "; case TTK_Interface: return "__interface "; -- cgit v1.2.3