aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/expr
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-03-29 23:39:39 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-03-29 23:39:39 +0000
commit1ef28dbcf1a8b72f590f2d73bc204e85605ab605 (patch)
treeb277ffc49cf66ae484eef2bd829bae9ba9a7f0ca /test/CXX/expr
parent4b81e742c8d23600e4244d69f20322e3535e3d86 (diff)
Extend -Wc++11-narrowing to cover converted constant expressions as well as braced-initializers. <rdar://problem/11121178>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153703 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/expr')
-rw-r--r--test/CXX/expr/expr.const/p3-0x-nowarn.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CXX/expr/expr.const/p3-0x-nowarn.cpp b/test/CXX/expr/expr.const/p3-0x-nowarn.cpp
new file mode 100644
index 0000000000..c891374519
--- /dev/null
+++ b/test/CXX/expr/expr.const/p3-0x-nowarn.cpp
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wno-c++11-narrowing -verify %s
+
+// <rdar://problem/11121178>
+void f(int x) {
+ switch (x) {
+ case 0x80000001: break;
+ }
+}