[clang] [Sema] Keep attribute lists in the order the attributes were parsed (PR #162714)
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 9 12:05:12 PDT 2025
================
@@ -835,16 +835,16 @@ class DeclSpec {
/// \endcode
///
void addAttributes(const ParsedAttributesView &AL) {
- Attrs.addAll(AL.begin(), AL.end());
+ Attrs.addAllPrepend(AL.begin(), AL.end());
}
bool hasAttributes() const { return !Attrs.empty(); }
ParsedAttributes &getAttributes() { return Attrs; }
const ParsedAttributes &getAttributes() const { return Attrs; }
- void takeAttributesFrom(ParsedAttributes &attrs) {
- Attrs.takeAllFrom(attrs);
+ void takeAttributesFromAppend(ParsedAttributes &attrs) {
----------------
compnerd wrote:
Does it make sense to inline the operation? i.e. `takeAttributesAppendingFrom`
https://github.com/llvm/llvm-project/pull/162714
More information about the cfe-commits
mailing list