]> granicus.if.org Git - clang/commit
Implement support for [[nodiscard]] in C++1z that is based off existing support for...
authorAaron Ballman <aaron@aaronballman.com>
Mon, 7 Mar 2016 22:44:55 +0000 (22:44 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 7 Mar 2016 22:44:55 +0000 (22:44 +0000)
commit3827f56644bb23fb687e722860b61e59641adedb
tree43f0ea99b2da1de94b926e7f0cd036c36787e228
parent45b0585fa2e7c9c467a938ce8838c9b3ceb01ca8
Implement support for [[nodiscard]] in C++1z that is based off existing support for warn_unused_result, and treat it as an extension pre-C++1z. This also means extending the existing warn_unused_result attribute so that it can be placed on an enum as well as a class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262872 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/clang/AST/Decl.h
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/AttributeList.h
lib/AST/Decl.cpp
lib/Parse/ParseDeclCXX.cpp
lib/Sema/SemaDeclAttr.cpp
lib/Sema/SemaStmt.cpp
test/Sema/unused-expr.c
test/SemaCXX/nodiscard.cpp [new file with mode: 0644]
test/SemaObjC/method-warn-unused-attribute.m
www/cxx_status.html