diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-09-30 22:11:31 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-09-30 22:11:31 +0000 |
commit | 717a20b9cebb0d261b74995f8ebf3a1c814bbc08 (patch) | |
tree | 2e25cc93abe4fdc8a366ac648c3fd390cd9dc52c /lib/Sema/SemaDecl.cpp | |
parent | 26e0b304557519c12b150afe23cd24e28fa20a1d (diff) |
Mark a TagDecl when it is free standing (e.g. "struct foo;")
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140894 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 983ed3eb99..942c1bc5c2 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -2249,6 +2249,9 @@ Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, 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." |