summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-18 06:38:24 +0000
committerChris Lattner <sabre@nondot.org>2009-04-18 06:38:24 +0000
commit5ca5d40cf4092bc55781e32b92525c6b4ce4c446 (patch)
tree000790601c2b83a8d00a1536e409ccc07284a8e5 /clang/lib/Lex
parent652d82a096996d5ee7665b2905742e1a23364862 (diff)
downloadbcm5719-llvm-5ca5d40cf4092bc55781e32b92525c6b4ce4c446.tar.gz
bcm5719-llvm-5ca5d40cf4092bc55781e32b92525c6b4ce4c446.zip
second half of PR3940: #line requires simple digit sequence.
llvm-svn: 69422
Diffstat (limited to 'clang/lib/Lex')
-rw-r--r--clang/lib/Lex/PPDirectives.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index e4b36fd1573..3d312748f95 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/lib/Lex/PPDirectives.cpp
@@ -654,7 +654,8 @@ static bool GetLineValue(Token &DigitTok, unsigned &Val,
// because it is octal.
if (Literal.getRadix() != 10)
PP.Diag(DigitTok, diag::warn_pp_line_decimal);
-
+ else if (Literal.hasSuffix())
+ PP.Diag(DigitTok, diag::warn_pp_line_digit_sequence);
return false;
}
OpenPOWER on IntegriCloud