diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-03-29 23:39:39 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-03-29 23:39:39 +0000 |
commit | 1ef28dbcf1a8b72f590f2d73bc204e85605ab605 (patch) | |
tree | b277ffc49cf66ae484eef2bd829bae9ba9a7f0ca /test/CXX/expr | |
parent | 4b81e742c8d23600e4244d69f20322e3535e3d86 (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.cpp | 8 |
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; + } +} |