mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-30 00:38:54 -04:00

This fixes a crash when analyzing LLVM that was exposed by r177220 (modeling of trivial copy/move assignment operators). When we look up a lazy binding for “Builder”, we see the direct binding of Loc at offset 0. Previously, we believed the binding, which led to a crash. Now, we do not believe it as the types do not match. llvm-svn: 177453
28 lines
405 B
C++
28 lines
405 B
C++
// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix -verify %s
|
|
// expected-no-diagnostics
|
|
|
|
class Loc {
|
|
int x;
|
|
};
|
|
class P1 {
|
|
public:
|
|
Loc l;
|
|
void setLoc(Loc L) {
|
|
l = L;
|
|
}
|
|
|
|
};
|
|
class P2 {
|
|
public:
|
|
int m;
|
|
int accessBase() {
|
|
return m;
|
|
}
|
|
};
|
|
class Derived: public P1, public P2 {
|
|
};
|
|
int radar13445834(Derived *Builder, Loc l) {
|
|
Builder->setLoc(l);
|
|
return Builder->accessBase();
|
|
|
|
} |