Skip to content

Commit 497b1b9

Browse files
committed
[analyzer] Move test case to existing test file and remove duplicated test file.
Summary: Move the test case to existing test file. Remove test file as duplicated. The file was mistakenly added due to concerns of a hidden bug (see https://reviews.llvm.org/D104381). After it turned out, that the bug was already fixed with another revision (https://reviews.llvm.org/D85817) and corresponding test was added as well, we can remove this file. Differential Revision: https://reviews.llvm.org/D106152
1 parent 919f0b4 commit 497b1b9

File tree

2 files changed

+24
-36
lines changed

2 files changed

+24
-36
lines changed

clang/test/Analysis/PR46264.cpp

+24
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,27 @@ int testIndirectCrash() {
3333

3434
return 10;
3535
}
36+
37+
// PR46264
38+
// This case shall not crash with an assertion failure about void* dereferening.
39+
namespace ns1 {
40+
namespace a {
41+
class b {
42+
public:
43+
typedef int b::*c;
44+
operator c() { return d ? &b::d : 0; }
45+
int d;
46+
};
47+
} // namespace a
48+
using a::b;
49+
class e {
50+
void f();
51+
void g();
52+
b h;
53+
};
54+
void e::f() {
55+
e *i;
56+
if (h)
57+
i->g(); // expected-warning{{Called C++ object pointer is uninitialized}}
58+
}
59+
} // namespace ns1

clang/test/Analysis/diagnostics/PR46264.cpp

-36
This file was deleted.

0 commit comments

Comments
 (0)