VK_RValue, RParenLoc);
// Bail out early if calling a builtin with custom typechecking.
- if (BuiltinID && Context.BuiltinInfo.hasCustomTypechecking(BuiltinID))
+ if (BuiltinID && Context.BuiltinInfo.hasCustomTypechecking(BuiltinID)) {
+ if (!getLangOpts().CPlusPlus) {
+ // C cannot handle TypoExpr nodes in the builtin's call expr because it
+ // doesn't handle dependent types properly, so make sure any TypoExprs have
+ // been dealt with.
+ ExprResult Result = CorrectDelayedTyposInExpr(TheCall);
+ if (!Result.isUsable()) return ExprError();
+ TheCall = dyn_cast<CallExpr>(Result.get());
+ if (!TheCall) return Result;
+ }
return CheckBuiltinFunctionCall(FDecl, BuiltinID, TheCall);
+ }
retry:
const FunctionType *FuncT;
return foo((__v2di)__x); // expected-warning {{implicit declaration of function 'foo'}} \
// expected-error {{use of undeclared identifier '__v2di'}}
}
+
+void f(long *a, long b) {
+ __atomic_or_fetch(a, b, c); // expected-error {{use of undeclared identifier 'c'}}
+}