bool DeclSpec::SetTypeSpecError() {
TypeSpecType = TST_error;
+ TypeSpecOwned = false;
TSTLoc = SourceLocation();
return false;
}
TypeSpecType = TST_int;
TypeSpecSign = TSS_unsigned;
TypeSpecWidth = TSW_short;
+ TypeSpecOwned = false;
}
}
: diag::err_invalid_longlong_spec)
<< getSpecifierName((TST)TypeSpecType);
TypeSpecType = TST_int;
+ TypeSpecOwned = false;
}
break;
case TSW_long: // long double, long int
Diag(D, TSWLoc, SrcMgr, diag::err_invalid_long_spec)
<< getSpecifierName((TST)TypeSpecType);
TypeSpecType = TST_int;
+ TypeSpecOwned = false;
}
break;
}
ClearStorageClassSpecs();
}
+ assert(!TypeSpecOwned || isDeclRep((TST) TypeSpecType));
+
// Okay, now we can infer the real type.
// TODO: return "auto function" and other bad things based on the real type.
void test14a();
void *test14b = (void*)test14a; // Make sure test14a didn't get skipped.
+
+// rdar://problem/8358508
+long struct X {} test15(); // expected-error {{'long struct' is invalid}}