summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2017-02-28 20:44:39 +0000
committerErich Keane <erich.keane@intel.com>2017-02-28 20:44:39 +0000
commit2fe684bb1478ef89efd8122e442ec76efaf5f857 (patch)
tree6ea9d1a0ddbbff7504694a42228813b530c965e9 /clang/lib/Sema/SemaDecl.cpp
parent318971880e76eb8922351451a25099be2856975d (diff)
downloadbcm5719-llvm-2fe684bb1478ef89efd8122e442ec76efaf5f857.tar.gz
bcm5719-llvm-2fe684bb1478ef89efd8122e442ec76efaf5f857.zip
Allow attributes before union definition
permits typedef union __attribute__((transparent_union)) {...} Differential Revision: https://reviews.llvm.org/D28266 llvm-svn: 296518
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 62bcabc2903..40ab1d29ae8 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -13637,9 +13637,6 @@ CreateNewDecl:
if (Invalid)
New->setInvalidDecl();
- if (Attr)
- ProcessDeclAttributeList(S, New, Attr);
-
// Set the lexical context. If the tag has a C++ scope specifier, the
// lexical context will be different from the semantic context.
New->setLexicalDeclContext(CurContext);
@@ -13658,6 +13655,9 @@ CreateNewDecl:
if (TUK == TUK_Definition)
New->startDefinition();
+ if (Attr)
+ ProcessDeclAttributeList(S, New, Attr);
+
// If this has an identifier, add it to the scope stack.
if (TUK == TUK_Friend) {
// We might be replacing an existing declaration in the lookup tables;
OpenPOWER on IntegriCloud