[analyzer] Revert 295545. There are buildbot failures.

llvm-svn: 295548
This commit is contained in:
Daniel Marjamaki 2017-02-18 16:31:35 +00:00
parent 86554de2bd
commit dc53b680cb
2 changed files with 0 additions and 12 deletions

View File

@ -84,13 +84,6 @@ bool CastToStructVisitor::VisitCastExpr(const CastExpr *CE) {
if (!VD || VD->getType()->isReferenceType())
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.
unsigned ToWidth = Ctx.getTypeInfo(ToPointeeTy).Width;
unsigned OrigWidth = Ctx.getTypeInfo(OrigPointeeTy).Width;

View File

@ -65,8 +65,3 @@ void intToStruct(int *P) {
void *VP = P;
Abc = (struct ABC *)VP;
}
// https://llvm.org/bugs/show_bug.cgi?id=31173
void dontCrash(struct AB X) {
struct UndefS *S = (struct UndefS *)&X;
}