summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPDirectives.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-09-26 18:13:20 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-09-26 18:13:20 +0000
commit7f2707a7f4b04c0ed10795a0f72d70bf6b6d8505 (patch)
tree6565c719cb3b58f3ce7cb7a7725f15ace690b762 /clang/lib/Lex/PPDirectives.cpp
parentaf1acd9a5e71cac8e08d051132f152f5b1f5cf47 (diff)
downloadbcm5719-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.cpp5
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;
OpenPOWER on IntegriCloud