diff options
Diffstat (limited to 'clang/include/clang/Sema')
-rw-r--r-- | clang/include/clang/Sema/DeclSpec.h | 16 | ||||
-rw-r--r-- | clang/include/clang/Sema/ParsedAttr.h | 16 | ||||
-rw-r--r-- | clang/include/clang/Sema/SemaOpenACC.h | 1 |
3 files changed, 17 insertions, 16 deletions
diff --git a/clang/include/clang/Sema/DeclSpec.h b/clang/include/clang/Sema/DeclSpec.h index c1a99a1..43a48c9 100644 --- a/clang/include/clang/Sema/DeclSpec.h +++ b/clang/include/clang/Sema/DeclSpec.h @@ -835,7 +835,7 @@ public: /// \endcode /// void addAttributes(const ParsedAttributesView &AL) { - Attrs.addAll(AL.begin(), AL.end()); + Attrs.prepend(AL.begin(), AL.end()); } bool hasAttributes() const { return !Attrs.empty(); } @@ -843,8 +843,8 @@ public: ParsedAttributes &getAttributes() { return Attrs; } const ParsedAttributes &getAttributes() const { return Attrs; } - void takeAttributesFrom(ParsedAttributes &attrs) { - Attrs.takeAllFrom(attrs); + void takeAttributesAppendingingFrom(ParsedAttributes &attrs) { + Attrs.takeAllAppendingFrom(attrs); } /// Finish - This does final analysis of the declspec, issuing diagnostics for @@ -2327,7 +2327,7 @@ public: void AddTypeInfo(const DeclaratorChunk &TI, ParsedAttributes &&attrs, SourceLocation EndLoc) { DeclTypeInfo.push_back(TI); - DeclTypeInfo.back().getAttrs().addAll(attrs.begin(), attrs.end()); + DeclTypeInfo.back().getAttrs().prepend(attrs.begin(), attrs.end()); getAttributePool().takeAllFrom(attrs.getPool()); if (!EndLoc.isInvalid()) @@ -2638,8 +2638,8 @@ public: return InventedTemplateParameterList; } - /// takeAttributes - Takes attributes from the given parsed-attributes - /// set and add them to this declarator. + /// takeAttributesAppending - Takes attributes from the given + /// ParsedAttributes set and add them to this declarator. /// /// These examples both add 3 attributes to "var": /// short int var __attribute__((aligned(16),common,deprecated)); @@ -2647,8 +2647,8 @@ public: /// __attribute__((common,deprecated)); /// /// Also extends the range of the declarator. - void takeAttributes(ParsedAttributes &attrs) { - Attrs.takeAllFrom(attrs); + void takeAttributesAppending(ParsedAttributes &attrs) { + Attrs.takeAllAppendingFrom(attrs); if (attrs.Range.getEnd().isValid()) SetRangeEnd(attrs.Range.getEnd()); diff --git a/clang/include/clang/Sema/ParsedAttr.h b/clang/include/clang/Sema/ParsedAttr.h index 2edee7e..5387f9f 100644 --- a/clang/include/clang/Sema/ParsedAttr.h +++ b/clang/include/clang/Sema/ParsedAttr.h @@ -856,19 +856,19 @@ public: friend class ParsedAttributesView; }; - void addAll(iterator B, iterator E) { + void prepend(iterator B, iterator E) { AttrList.insert(AttrList.begin(), B.I, E.I); } - void addAll(const_iterator B, const_iterator E) { + void prepend(const_iterator B, const_iterator E) { AttrList.insert(AttrList.begin(), B.I, E.I); } - void addAllAtEnd(iterator B, iterator E) { + void append(iterator B, iterator E) { AttrList.insert(AttrList.end(), B.I, E.I); } - void addAllAtEnd(const_iterator B, const_iterator E) { + void append(const_iterator B, const_iterator E) { AttrList.insert(AttrList.end(), B.I, E.I); } @@ -943,18 +943,18 @@ public: AttributePool &getPool() const { return pool; } - void takeAllFrom(ParsedAttributes &Other) { + void takeAllPrependingFrom(ParsedAttributes &Other) { assert(&Other != this && "ParsedAttributes can't take attributes from itself"); - addAll(Other.begin(), Other.end()); + prepend(Other.begin(), Other.end()); Other.clearListOnly(); pool.takeAllFrom(Other.pool); } - void takeAllAtEndFrom(ParsedAttributes &Other) { + void takeAllAppendingFrom(ParsedAttributes &Other) { assert(&Other != this && "ParsedAttributes can't take attributes from itself"); - addAllAtEnd(Other.begin(), Other.end()); + append(Other.begin(), Other.end()); Other.clearListOnly(); pool.takeAllFrom(Other.pool); } diff --git a/clang/include/clang/Sema/SemaOpenACC.h b/clang/include/clang/Sema/SemaOpenACC.h index 09fdf75..6cadc34 100644 --- a/clang/include/clang/Sema/SemaOpenACC.h +++ b/clang/include/clang/Sema/SemaOpenACC.h @@ -911,6 +911,7 @@ public: ExprResult CheckReductionVar(OpenACCDirectiveKind DirectiveKind, OpenACCReductionOperator ReductionOp, Expr *VarExpr); + bool CheckReductionVarType(Expr *VarExpr); /// Called to check the 'var' type is a variable of pointer type, necessary /// for 'deviceptr' and 'attach' clauses. Returns true on success. |