summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/diagnostics/no-store-func-path-notes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/diagnostics/no-store-func-path-notes.cpp')
-rw-r--r--clang/test/Analysis/diagnostics/no-store-func-path-notes.cpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/clang/test/Analysis/diagnostics/no-store-func-path-notes.cpp b/clang/test/Analysis/diagnostics/no-store-func-path-notes.cpp
index 17ec96ae5b7..b96dc4cf2a8 100644
--- a/clang/test/Analysis/diagnostics/no-store-func-path-notes.cpp
+++ b/clang/test/Analysis/diagnostics/no-store-func-path-notes.cpp
@@ -97,14 +97,6 @@ struct C {
int x;
int y;
C(int pX, int pY) : x(pX) {} // expected-note{{Returning without writing to 'this->y'}}
-
- C(int pX, int pY, bool Flag) {
- x = pX;
- if (Flag) // expected-note{{Assuming 'Flag' is not equal to 0}}
- // expected-note@-1{{Taking true branch}}
- return; // expected-note{{Returning without writing to 'this->y'}}
- y = pY;
- }
};
int use_constructor() {
@@ -114,15 +106,6 @@ int use_constructor() {
// expected-warning@-1{{Undefined or garbage value returned to caller}}
}
-int coin();
-
-int use_other_constructor() {
- C c(0, 0, coin()); // expected-note{{Calling constructor for 'C'}}
- // expected-note@-1{{Returning from constructor for 'C'}}
- return c.y; // expected-note{{Undefined or garbage value returned to caller}}
- // expected-warning@-1{{Undefined or garbage value returned to caller}}
-}
-
struct D {
void initialize(int *);
};
@@ -139,6 +122,8 @@ int use_d_initializer(D* d) {
// expected-warning@-1{{Undefined or garbage value returned to caller}}
}
+int coin();
+
struct S2 {
int x;
};
OpenPOWER on IntegriCloud