aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorMichael Kruse <llvm@meinersbur.de>2018-06-25 20:06:13 +0000
committerMichael Kruse <llvm@meinersbur.de>2018-06-25 20:06:13 +0000
commit41dd6ced2c8323aa804c3aed57f120746ab7f3fc (patch)
treebafdc35a26910c8a213596380a4bc25559485804 /clang/lib/Parse/ParseDecl.cpp
parent05f6626fc48b40c332c0f4d082284b39d38e23c7 (diff)
downloadllvm-41dd6ced2c8323aa804c3aed57f120746ab7f3fc.zip
llvm-41dd6ced2c8323aa804c3aed57f120746ab7f3fc.tar.gz
llvm-41dd6ced2c8323aa804c3aed57f120746ab7f3fc.tar.bz2
Revert "Append new attributes to the end of an AttributeList."
This reverts commit r335084 as requested by David Jones and Eric Christopher because of differences of emitted warnings. llvm-svn: 335516
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index e369156..d1f87c9 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -1649,7 +1649,9 @@ void Parser::stripTypeAttributesOffDeclSpec(ParsedAttributesWithRange &Attrs,
}
// Find end of type attributes Attrs and add NewTypeAttributes in the same
- // order they were in originally.
+ // order they were in originally. (Remember, in AttributeList things earlier
+ // in source order are later in the list, since new attributes are added to
+ // the front of the list.)
Attrs.addAllAtEnd(TypeAttrHead);
}