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/Parser/cxx-ambig-init-templ.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/Parser/cxx-ambig-init-templ.cpp')
-rw-r--r-- | clang/test/Parser/cxx-ambig-init-templ.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Parser/cxx-ambig-init-templ.cpp b/clang/test/Parser/cxx-ambig-init-templ.cpp index 88ab61c3ab6..ac79f77e152 100644 --- a/clang/test/Parser/cxx-ambig-init-templ.cpp +++ b/clang/test/Parser/cxx-ambig-init-templ.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -verify %s +// RUN: %clang_cc1 -Wno-uninitialized -std=c++11 -verify %s template<int> struct c { c(int) = delete; typedef void val; operator int() const; }; |