summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2013-01-08 01:50:40 +0000
committerTed Kremenek <kremenek@apple.com>2013-01-08 01:50:40 +0000
commita0461690006fe1f8e9b636f8b9e2d537299c91ca (patch)
tree84b240e00f7100afe00886aa3ddd13fb01a67f42 /clang/lib/Sema
parentf7e654e3a7ef73c60a4a9ea73d966ac411a20d91 (diff)
downloadbcm5719-llvm-a0461690006fe1f8e9b636f8b9e2d537299c91ca.tar.gz
bcm5719-llvm-a0461690006fe1f8e9b636f8b9e2d537299c91ca.zip
Don't warn about undefined varargs argument behavior in unreachable code.
Fixes <rdar://problem/12322000>. llvm-svn: 171831
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index bac897748f7..3702aa037c1 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -9716,11 +9716,11 @@ ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc,
if (TInfo->getType()->isSpecificBuiltinType(BuiltinType::Float))
PromoteType = Context.DoubleTy;
if (!PromoteType.isNull())
- Diag(TInfo->getTypeLoc().getBeginLoc(),
- diag::warn_second_parameter_to_va_arg_never_compatible)
- << TInfo->getType()
- << PromoteType
- << TInfo->getTypeLoc().getSourceRange();
+ DiagRuntimeBehavior(TInfo->getTypeLoc().getBeginLoc(), E,
+ PDiag(diag::warn_second_parameter_to_va_arg_never_compatible)
+ << TInfo->getType()
+ << PromoteType
+ << TInfo->getTypeLoc().getSourceRange());
}
QualType T = TInfo->getType().getNonLValueExprType(Context);
OpenPOWER on IntegriCloud