diff options
author | Volodymyr Sapsai <vsapsai@apple.com> | 2018-01-02 18:02:19 +0000 |
---|---|---|
committer | Volodymyr Sapsai <vsapsai@apple.com> | 2018-01-02 18:02:19 +0000 |
commit | 42b72e29943292e75367ea07c49859f183e423df (patch) | |
tree | 46bbb3377dcc67db7235399f14f7ff506a80444d /clang/lib | |
parent | 9e4431fff02ea6a5e0542c06ff24618f08a98466 (diff) | |
download | bcm5719-llvm-42b72e29943292e75367ea07c49859f183e423df.tar.gz bcm5719-llvm-42b72e29943292e75367ea07c49859f183e423df.zip |
[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
llvm-svn: 321660
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaType.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 4dab52a9f5f..af060cf21b5 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/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"); |