aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-01-31 19:19:25 +0000
committerTed Kremenek <kremenek@apple.com>2012-01-31 19:19:25 +0000
commit289e31f386fe8b5e489588533e34c4e21df764bd (patch)
tree0b47d096e1086aee35894c57c902f2e2519201a3 /lib/Sema/SemaChecking.cpp
parent56e68b712931e66612b01ecf0af27a05e5d12648 (diff)
Revert r149359. This was a hack to a problem with an easy workaround, and it doesn't feel like general solution.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149404 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r--lib/Sema/SemaChecking.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index 5e8770888c..4b507f456c 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -3699,24 +3699,15 @@ static void AnalyzeAssignment(Sema &S, BinaryOperator *E) {
/// Diagnose an implicit cast; purely a helper for CheckImplicitConversion.
static void DiagnoseImpCast(Sema &S, Expr *E, QualType SourceType, QualType T,
- SourceLocation CContext, unsigned diag,
- bool pruneControlFlow = false) {
- if (pruneControlFlow) {
- S.DiagRuntimeBehavior(E->getExprLoc(), E,
- S.PDiag(diag)
- << SourceType << T << E->getSourceRange()
- << SourceRange(CContext));
- return;
- }
+ SourceLocation CContext, unsigned diag) {
S.Diag(E->getExprLoc(), diag)
<< SourceType << T << E->getSourceRange() << SourceRange(CContext);
}
/// Diagnose an implicit cast; purely a helper for CheckImplicitConversion.
static void DiagnoseImpCast(Sema &S, Expr *E, QualType T,
- SourceLocation CContext, unsigned diag,
- bool pruneControlFlow = false) {
- DiagnoseImpCast(S, E, E->getType(), T, CContext, diag, pruneControlFlow);
+ SourceLocation CContext, unsigned diag) {
+ DiagnoseImpCast(S, E, E->getType(), T, CContext, diag);
}
/// Diagnose an implicit cast from a literal expression. Does not warn when the
@@ -3922,8 +3913,7 @@ void CheckImplicitConversion(Sema &S, Expr *E, QualType T,
return;
if (SourceRange.Width == 64 && TargetRange.Width == 32)
- return DiagnoseImpCast(S, E, T, CC, diag::warn_impcast_integer_64_32,
- /* pruneControlFlow */ true);
+ return DiagnoseImpCast(S, E, T, CC, diag::warn_impcast_integer_64_32);
return DiagnoseImpCast(S, E, T, CC, diag::warn_impcast_integer_precision);
}