[analyzer] Revert 295545. There are buildbot failures.
llvm-svn: 295548
This commit is contained in:
parent
86554de2bd
commit
dc53b680cb
|
@ -84,13 +84,6 @@ bool CastToStructVisitor::VisitCastExpr(const CastExpr *CE) {
|
||||||
if (!VD || VD->getType()->isReferenceType())
|
if (!VD || VD->getType()->isReferenceType())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Don't warn when target type has no definition.
|
|
||||||
if (const RecordType *RD = dyn_cast<RecordType>(ToPointeeTy.getTypePtr())) {
|
|
||||||
if (!RD->getDecl()->getDefinition()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Warn when there is widening cast.
|
// Warn when there is widening cast.
|
||||||
unsigned ToWidth = Ctx.getTypeInfo(ToPointeeTy).Width;
|
unsigned ToWidth = Ctx.getTypeInfo(ToPointeeTy).Width;
|
||||||
unsigned OrigWidth = Ctx.getTypeInfo(OrigPointeeTy).Width;
|
unsigned OrigWidth = Ctx.getTypeInfo(OrigPointeeTy).Width;
|
||||||
|
|
|
@ -65,8 +65,3 @@ void intToStruct(int *P) {
|
||||||
void *VP = P;
|
void *VP = P;
|
||||||
Abc = (struct ABC *)VP;
|
Abc = (struct ABC *)VP;
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://llvm.org/bugs/show_bug.cgi?id=31173
|
|
||||||
void dontCrash(struct AB X) {
|
|
||||||
struct UndefS *S = (struct UndefS *)&X;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue