]> granicus.if.org Git - clang/commit
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)
commit51ceb7bab599ea7d39d290ff5e88e4a1f0f5bc5c
treef48a80675d89be32161e03983fad72a97da6cbe1
parentd51db4935736fd943bfd46dfa74d41e9a3c2d41f
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167783 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/Attr.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclAttr.cpp
test/SemaCXX/warn-unused-result.cpp