We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c21d6cf commit 2f186c9Copy full SHA for 2f186c9
clang/test/Analysis/initializer.cpp
@@ -451,15 +451,15 @@ struct S {
451
};
452
void aggregate_struct() {
453
S s;
454
- ::new (&s) S{1};
+ new (&s) S{1};
455
clang_analyzer_eval(1 == s.x); // expected-warning{{TRUE}}
456
457
S vi;
458
- ::new (&vi) S{};
+ new (&vi) S{};
459
clang_analyzer_eval(0 == vi.x); // expected-warning{{TRUE}}
460
461
S di;
462
- ::new (&di) S;
+ new (&di) S;
463
int z = di.x + 1; // expected-warning{{The left operand of '+' is a garbage value}}
464
}
465
void initialize_non_zeroth_element(S arr[2]) {
0 commit comments