From 9ca0826f25d52d34be422969e20456acbbf7d402 Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Tue, 2 Jan 2018 18:02:19 +0000 Subject: [Sema] Don't emit the -Wstrict-prototypes warning for variadic functions. rdar://problem/33251668 Reviewers: arphaman, ahatanak Reviewed By: arphaman Subscribers: ptitei, cfe-commits Differential Revision: https://reviews.llvm.org/D41528 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321660 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaType.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 4dab52a9f5..af060cf21b 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -4767,7 +4767,7 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, break; case DeclaratorChunk::Function: { const DeclaratorChunk::FunctionTypeInfo &FTI = DeclType.Fun; - if (FTI.NumParams == 0) + if (FTI.NumParams == 0 && !FTI.isVariadic) S.Diag(DeclType.Loc, diag::warn_strict_prototypes) << IsBlock << FixItHint::CreateInsertion(FTI.getRParenLoc(), "void"); -- cgit v1.2.3