diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-17 23:37:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-17 23:37:49 +0000 |
commit | 58e91d57510a5ce4fd424fe7fd1cdfa86701ef35 (patch) | |
tree | 732b1fd8e5c9492b61bd5f6b960013a93cd224c9 /lib/Lex/PPDirectives.cpp | |
parent | ab82f41b217ce588a9456c0b4411f219d3ed0df8 (diff) |
implement PR3940: #line numbers not fully checked
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69403 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPDirectives.cpp')
-rw-r--r-- | lib/Lex/PPDirectives.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index ce86d0edca..2dfb6233bd 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -650,6 +650,11 @@ static bool GetLineValue(Token &DigitTok, unsigned &Val, return true; } + // Warn about hex and octal line numbers. Do this after the check for 0, + // because it is octal. + if (Literal.getRadix() != 10) + PP.Diag(DigitTok, diag::warn_pp_line_decimal); + return false; } |