[PATCH] D50214: Add inherited attributes before parsed attributes.

Michael Kruse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 2 19:23:25 PDT 2018


Meinersbur created this revision.
Meinersbur added reviewers: hfinkel, aaron.ballman, nicholas, dlj, echristo, erichkeane.

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.


Repository:
  rC Clang

https://reviews.llvm.org/D50214

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50214.158887.patch
Type: text/x-patch
Size: 7115 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180803/de6cb51e/attachment.bin>


More information about the cfe-commits mailing list