diff options
Diffstat (limited to 'clang/lib/Sema/SemaAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaAttr.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaAttr.cpp b/clang/lib/Sema/SemaAttr.cpp index 64f12f3f5e4..cc155b7ff6b 100644 --- a/clang/lib/Sema/SemaAttr.cpp +++ b/clang/lib/Sema/SemaAttr.cpp @@ -645,7 +645,7 @@ void Sema::AddPragmaAttributes(Scope *S, Decl *D) { if (PragmaAttributeStack.empty()) return; for (auto &Entry : PragmaAttributeStack) { - const AttributeList *Attribute = Entry.Attribute; + AttributeList *Attribute = Entry.Attribute; assert(Attribute && "Expected an attribute"); // Ensure that the attribute can be applied to the given declaration. @@ -659,9 +659,10 @@ void Sema::AddPragmaAttributes(Scope *S, Decl *D) { if (!Applies) continue; Entry.IsUsed = true; - assert(!Attribute->getNext() && "Expected just one attribute"); PragmaAttributeCurrentTargetDecl = D; - ProcessDeclAttributeList(S, D, Attribute); + ParsedAttributesView Attrs; + Attrs.addAtStart(Attribute); + ProcessDeclAttributeList(S, D, Attrs); PragmaAttributeCurrentTargetDecl = nullptr; } } |