Mark a TagDecl when it is free standing (e.g. "struct foo;")
llvm-svn: 140894
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 983ed3e..942c1bc 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -2249,6 +2249,9 @@
Tag = dyn_cast<TagDecl>(TagD);
}
+ if (Tag)
+ Tag->setFreeStanding();
+
if (unsigned TypeQuals = DS.getTypeQualifiers()) {
// Enforce C99 6.7.3p2: "Types other than pointer types derived from object
// or incomplete types shall not be restrict-qualified."