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/cxx0x-class.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/cxx0x-class.cpp')
-rw-r--r-- | clang/test/SemaCXX/cxx0x-class.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/cxx0x-class.cpp b/clang/test/SemaCXX/cxx0x-class.cpp index 074591e7063..2b1338f97fd 100644 --- a/clang/test/SemaCXX/cxx0x-class.cpp +++ b/clang/test/SemaCXX/cxx0x-class.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wno-error=static-float-init %s +// RUN: %clang_cc1 -Wno-uninitialized -fsyntax-only -verify -std=c++11 -Wno-error=static-float-init %s int vs = 0; |