Fixes PR21656, which is fallout from r222551 caused by an untested/missed
code path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222694
91177308-0d34-0410-b5e6-
96231b3b80d8
if (getLangOpts().CPlusPlus) {
// Check that there are no default arguments (C++ only).
CheckExtraCXXDefaultArguments(D);
+ } else {
+ // Make sure any TypoExprs have been dealt with.
+ ExprResult Res = CorrectDelayedTyposInExpr(CastExpr);
+ if (!Res.isUsable())
+ return ExprError();
+ CastExpr = Res.get();
}
checkUnusedDeclAttributes(D);
// than in C++ and may exhibit different behavior as a result.
__typeof__(struct F*) var[invalid]; // expected-error-re {{use of undeclared identifier 'invalid'{{$}}}}
+
+void PR21656() {
+ float x;
+ x = (float)arst; // expected-error-re {{use of undeclared identifier 'arst'{{$}}}}
+}