diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-09-26 18:13:20 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-09-26 18:13:20 +0000 |
commit | 7f2707a7f4b04c0ed10795a0f72d70bf6b6d8505 (patch) | |
tree | 6565c719cb3b58f3ce7cb7a7725f15ace690b762 /clang/lib/Lex/PPDirectives.cpp | |
parent | af1acd9a5e71cac8e08d051132f152f5b1f5cf47 (diff) | |
download | bcm5719-llvm-7f2707a7f4b04c0ed10795a0f72d70bf6b6d8505.tar.gz bcm5719-llvm-7f2707a7f4b04c0ed10795a0f72d70bf6b6d8505.zip |
Per updates to D3781, allow underscore under ' in a pp-number, and allow ' in a #line directive.
llvm-svn: 191443
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 75919925961..99b30c67ac3 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -911,6 +911,11 @@ static bool GetLineValue(Token &DigitTok, unsigned &Val, // here. Val = 0; for (unsigned i = 0; i != ActualLength; ++i) { + // C++1y [lex.fcon]p1: + // Optional separating single quotes in a digit-sequence are ignored + if (DigitTokBegin[i] == '\'') + continue; + if (!isDigit(DigitTokBegin[i])) { PP.Diag(PP.AdvanceToTokenCharacter(DigitTok.getLocation(), i), diag::err_pp_line_digit_sequence) << IsGNULineDirective; |