diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-05-01 01:53:49 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-05-01 01:53:49 +0000 |
commit | 6d3b93d631640125f912339df19b0d2a15af5c9b (patch) | |
tree | 6cb4382efb097d995c67564f6f731bf5dfa235e2 /lib/Sema/SemaChecking.cpp | |
parent | c30636a160c640f32f847637004a2632b88cad6c (diff) |
Turn the mixed-sign-comparison diagnostic into a runtime behavior
diagnostic, from Eitan Adler!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155876 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 979a646442..002c985e0c 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -3952,9 +3952,10 @@ static void AnalyzeComparison(Sema &S, BinaryOperator *E) { return; } - S.Diag(E->getOperatorLoc(), diag::warn_mixed_sign_comparison) - << LHS->getType() << RHS->getType() - << LHS->getSourceRange() << RHS->getSourceRange(); + S.DiagRuntimeBehavior(E->getOperatorLoc(), E, + S.PDiag(diag::warn_mixed_sign_comparison) + << LHS->getType() << RHS->getType() + << LHS->getSourceRange() << RHS->getSourceRange()); } /// Analyzes an attempt to assign the given value to a bitfield. |