summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/expr/expr.unary
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-12-17 21:57:17 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-12-17 21:57:17 +0000
commit6c93b3e29c56d14eab570ce62cd646a95f0c1403 (patch)
tree69fbc580587cf8545f536f5fda9b6663791920a5 /clang/test/CXX/expr/expr.unary
parent4de56ef736fedb64d059fa6a922abd10b5f18690 (diff)
downloadbcm5719-llvm-6c93b3e29c56d14eab570ce62cd646a95f0c1403.tar.gz
bcm5719-llvm-6c93b3e29c56d14eab570ce62cd646a95f0c1403.zip
Adding a -Wunused-value warning for expressions with side effects used in an unevaluated expression context, such as sizeof(), or decltype(). Also adds a similar warning when the expression passed to typeid() *is* evaluated, since it is equally likely that the user would expect the expression operand to be unevaluated in that case.
llvm-svn: 224465
Diffstat (limited to 'clang/test/CXX/expr/expr.unary')
-rw-r--r--clang/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp b/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp
index 427e8c5007f..a2a57956df9 100644
--- a/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp
+++ b/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify -std=c++11 -fms-extensions -Wno-delete-incomplete %s
+// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify -std=c++11 -fms-extensions -Wno-delete-incomplete -Wno-unused-value %s
// expected-no-diagnostics
#define P(e) static_assert(noexcept(e), "expected nothrow")
OpenPOWER on IntegriCloud