]> granicus.if.org Git - clang/commit
Add inherited attributes before parsed attributes.
authorMichael Kruse <llvm@meinersbur.de>
Mon, 24 Sep 2018 06:31:37 +0000 (06:31 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Mon, 24 Sep 2018 06:31:37 +0000 (06:31 +0000)
commit9884fc1d0881576784e9b50da9eb61a5eb427f1c
tree01d5710513e4eb76f75a33564cb64842ae68cc4d
parent4de08b666e9389025197e8809a6c30eda1c0edcd
Add inherited attributes before parsed attributes.

Currently, attributes from previous declarations ('inherited attributes')
are added to the end of a declaration's list of attributes. Before
r338800, the attribute list was in reverse. r338800 changed the order
of non-inherited (parsed from the current declaration) attributes, but
inherited attributes are still appended to the end of the list.

This patch appends inherited attributes after other inherited
attributes, but before any non-inherited attribute. This is to make the
order of attributes in the AST correspond to the order in the source
code.

Differential Revision: https://reviews.llvm.org/D50214

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342861 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/DeclBase.h
lib/AST/DeclBase.cpp
test/Misc/ast-dump-attr.cpp
test/Sema/attr-availability-ios.c
test/Sema/attr-availability-tvos.c
test/Sema/attr-availability-watchos.c