summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorJoel E. Denny <jdenny.ornl@gmail.com>2018-04-24 14:50:23 +0000
committerJoel E. Denny <jdenny.ornl@gmail.com>2018-04-24 14:50:23 +0000
commitc2575a376a9d2fef439eb74c098eba812d8cc772 (patch)
treef38859b7e624d72c9ea57b0d75ed276762849d39 /llvm/tools
parentc410083312731009a5ff334d7f357e4d9a160eb0 (diff)
downloadbcm5719-llvm-c2575a376a9d2fef439eb74c098eba812d8cc772.tar.gz
bcm5719-llvm-c2575a376a9d2fef439eb74c098eba812d8cc772.zip
[Attr] Print enum attributes at correct position
For example, given: void fn() { enum __attribute__((deprecated)) T *p; } -ast-print produced: void fn() { enum T __attribute__((deprecated(""))) *p; } -ast-print on that produced: void fn() { enum T *p __attribute__((deprecated(""))); } The attribute is on enum T in the first case, but it's on p in the other cases. Details: Within enum declarations, enum attributes were always printed after the tag and any member list. When no member list was present but the enum was a type specifier in a variable declaration, the attribute then applied to the variable not the enum, changing the semantics. This patch fixes that by always printing attributes between the enum's keyword and tag, as clang already does for structs, unions, and classes. Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D45456 llvm-svn: 330722
Diffstat (limited to 'llvm/tools')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud