diff options
author | Gabor Horvath <xazax.hun@gmail.com> | 2019-01-29 10:27:14 +0000 |
---|---|---|
committer | Gabor Horvath <xazax.hun@gmail.com> | 2019-01-29 10:27:14 +0000 |
commit | df4319332f38db90cd9dd4af9afa94c2ed429fc7 (patch) | |
tree | 5aca97257ea41d49efdc66908d7542e9c264f8f9 /test/Analysis/cxx-uninitialized-object.cpp | |
parent | ad06eca808f857ae9c8dd9d3e868dd4cc65d3710 (diff) |
[analyzer] Toning down invalidation a bit
When a function takes the address of a field the analyzer will no longer
assume that the function will change other fields of the enclosing structs.
Differential Revision: https://reviews.llvm.org/D57230
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352473 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/cxx-uninitialized-object.cpp')
-rw-r--r-- | test/Analysis/cxx-uninitialized-object.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/Analysis/cxx-uninitialized-object.cpp b/test/Analysis/cxx-uninitialized-object.cpp index 07006bea47..93a02a4838 100644 --- a/test/Analysis/cxx-uninitialized-object.cpp +++ b/test/Analysis/cxx-uninitialized-object.cpp @@ -358,7 +358,7 @@ template <class T> void wontInitialize(const T &); class PassingToUnknownFunctionTest1 { - int a, b; + int a, b; // expected-note{{uninitialized field 'this->b'}} public: PassingToUnknownFunctionTest1() { @@ -368,8 +368,7 @@ public: } PassingToUnknownFunctionTest1(int) { - mayInitialize(a); - // All good! + mayInitialize(a); // expected-warning{{1 uninitialized field at the end of the constructor call}} } PassingToUnknownFunctionTest1(int, int) { |