aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-05-05 06:45:50 +0000
committerChris Lattner <sabre@nondot.org>2008-05-05 06:45:50 +0000
commit8ed3044a33679cbfa0617d465a50ec557d671ed7 (patch)
tree4cbdd69798308e86a27e5edd339d53c714e7ce50 /include/clang/Basic
parent9e66ba6d1c1c0e11b261e3b20ff02b999621021a (diff)
Neil pointed out that clang doesn't generate ranges from diagnostics
related to pp-expressions. Doing so is pretty simple and this patch implements it, yielding nice diagnostics like: t.c:2:7: error: division by zero in preprocessor expression #if 1 / (0 + 0) ~ ^ ~~~~~~~ t.c:5:14: error: expected ')' in preprocessor expression #if (412 + 42 ~~~~~~~~^ t.c:5:5: error: to match this '(' #if (412 + 42 ^ t.c:10:10: warning: left side of operator converted from negative value to unsigned: -42 to 18446744073709551574 #if (-42 + 0U) / -2 ~~~ ^ ~~ t.c:10:16: warning: right side of operator converted from negative value to unsigned: -2 to 18446744073709551614 #if (-42 + 0U) / -2 ~~~~~~~~~~ ^ ~~ 5 diagnostics generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50638 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/DiagnosticKinds.def2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/clang/Basic/DiagnosticKinds.def b/include/clang/Basic/DiagnosticKinds.def
index f8583a9019..2f281128c7 100644
--- a/include/clang/Basic/DiagnosticKinds.def
+++ b/include/clang/Basic/DiagnosticKinds.def
@@ -201,8 +201,6 @@ DIAG(err_pp_missing_rparen, ERROR,
"missing ')' after \"defined\"")
DIAG(err_pp_colon_without_question, ERROR,
"':' without preceding '?'")
-DIAG(err_pp_question_without_colon, ERROR,
- "'?' without following ':'")
DIAG(err_pp_division_by_zero, ERROR,
"division by zero in preprocessor expression")
DIAG(err_pp_remainder_by_zero, ERROR,