diff options
author | Richard Trieu <rtrieu@google.com> | 2013-09-20 03:03:06 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2013-09-20 03:03:06 +0000 |
commit | 406e65c8d1754985b04f74fec42edd47a0844934 (patch) | |
tree | 16d50c11e5fadf0f131c2e83c314312b21fabc36 /clang/test/SemaCXX/constexpr-value-init.cpp | |
parent | b8c65f0136faf07eb2d33a3d0436adae41b388a9 (diff) | |
download | bcm5719-llvm-406e65c8d1754985b04f74fec42edd47a0844934.tar.gz bcm5719-llvm-406e65c8d1754985b04f74fec42edd47a0844934.zip |
Modify the uninitialized field visitor to detect uninitialized use across the
fields in the class. This allows a better checking of member intiailizers and
in class initializers in regards to initialization ordering.
For instance, this code will now produce warnings:
class A {
int x;
int y;
A() : x(y) {} // y is initialized after x, warn here
A(int): y(x) {} // default initialization of leaves x uninitialized, warn here
};
Several test cases were updated with -Wno-uninitialized to silence this warning.
llvm-svn: 191068
Diffstat (limited to 'clang/test/SemaCXX/constexpr-value-init.cpp')
-rw-r--r-- | clang/test/SemaCXX/constexpr-value-init.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/constexpr-value-init.cpp b/clang/test/SemaCXX/constexpr-value-init.cpp index d137bd88db0..e5b7db50eb6 100644 --- a/clang/test/SemaCXX/constexpr-value-init.cpp +++ b/clang/test/SemaCXX/constexpr-value-init.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -std=c++11 -fsyntax-only -verify +// RUN: %clang_cc1 %s -Wno-uninitialized -std=c++11 -fsyntax-only -verify struct A { constexpr A() : a(b + 1), b(a + 1) {} // expected-note {{outside its lifetime}} |