Enable C++11 attribute syntax for warn_unused_result and allow it to be
authorKaelyn Uhrain <rikka@google.com>
Mon, 12 Nov 2012 23:48:05 +0000 (23:48 +0000)
committerKaelyn Uhrain <rikka@google.com>
Mon, 12 Nov 2012 23:48:05 +0000 (23:48 +0000)
commit8681f9d46dc57b2914814009bc8d77f75626a785
tree67a857e63d53f6d1e7eb19cbb1b97ad0e3e24de1
parent84705096b2e37448cc97ae8cdfb30129f2ba69f0
Enable C++11 attribute syntax for warn_unused_result and allow it to be
applied to CXXRecordDecls, where functions with that return type will
inherit the warn_unused_result attribute.

Also includes a tiny fix (with no discernable behavior change for
existing code) to re-sync AttributeDeclKind enum and
err_attribute_wrong_decl_type with warn_attribute_wrong_decl_type since
the enum is used with both diagnostic messages to chose the correct
description.

llvm-svn: 167783
clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/SemaCXX/warn-unused-result.cpp