When attribute 'optnone' appears on the same declaration with a
authorPaul Robinson <paul_robinson@playstation.sony.com>
Tue, 13 Jan 2015 18:34:56 +0000 (18:34 +0000)
committerPaul Robinson <paul_robinson@playstation.sony.com>
Tue, 13 Jan 2015 18:34:56 +0000 (18:34 +0000)
commit080b1f3055b1f60588deab6839c1e87647b3c284
tree775f011f0755f0d456ade37ceb43a27b80a6300e
parentdc0a11c21fd799c9c22d8f9d274171a31ba24140
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 spelling, same attribute) so
fixed that up to report the attribute as spelled in the source.

llvm-svn: 225813
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/SemaCXX/attr-optnone.cpp