[PATCH] Downgrade 'optnone' attribute conflicts to warning
Paul Robinson
Paul_Robinson at playstation.sony.com
Mon Jan 12 12:31:45 PST 2015
Hi aaron.ballman,
When attribute 'optnone' appears on the same declaration with a
conflicting attribute, warn about the conflict and pick a "winning"
attribute to preserve, instead of emitting an error. This matches the
behavior when the conflicting attributes are on different declarations.
Along the way I discovered that conflicts involving __forceinline were
reported as 'always_inline' (alternate spellings for the same
attribute) so I hacked in a way to provide the spelling used in the
declaration. There must be a better way, though...
http://reviews.llvm.org/D6933
Files:
include/clang/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclAttr.cpp
test/SemaCXX/attr-optnone.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6933.18037.patch
Type: text/x-patch
Size: 7759 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150112/3de66605/attachment.bin>
More information about the cfe-commits
mailing list