summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 1666551d51f..f16ef0cd43c 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -7943,12 +7943,12 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD,
// Semantic checking for this function declaration (in isolation).
- // Diagnose the use of callee-cleanup calls on unprototyped functions.
+ // Diagnose calling conventions that don't support variadic calls.
QualType NewQType = Context.getCanonicalType(NewFD->getType());
const FunctionType *NewType = cast<FunctionType>(NewQType);
if (isa<FunctionNoProtoType>(NewType)) {
FunctionType::ExtInfo NewTypeInfo = NewType->getExtInfo();
- if (isCalleeCleanup(NewTypeInfo.getCC())) {
+ if (!supportsVariadicCall(NewTypeInfo.getCC())) {
// Windows system headers sometimes accidentally use stdcall without
// (void) parameters, so use a default-error warning in this case :-/
int DiagID = NewTypeInfo.getCC() == CC_X86StdCall
OpenPOWER on IntegriCloud