summaryrefslogtreecommitdiffstats
path: root/lib/Lex/Lexer.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-03-21 10:50:08 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-03-21 10:50:08 +0000
commit1e255aab650a7fa2047fd953cae65b12215280af (patch)
tree508d4388db78f87d35bf26a0400b4b03bc4c1f13 /lib/Lex/Lexer.cpp
parent1033b7c1e32962948b01a25145829f17bc70a8de (diff)
downloadFreeBSD-src-1e255aab650a7fa2047fd953cae65b12215280af.zip
FreeBSD-src-1e255aab650a7fa2047fd953cae65b12215280af.tar.gz
Update clang to r99115.
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r--lib/Lex/Lexer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp
index 6cdb96f..2f89142 100644
--- a/lib/Lex/Lexer.cpp
+++ b/lib/Lex/Lexer.cpp
@@ -1036,7 +1036,11 @@ bool Lexer::SaveBCPLComment(Token &Result, const char *CurPtr) {
// If this BCPL-style comment is in a macro definition, transmogrify it into
// a C-style block comment.
- std::string Spelling = PP->getSpelling(Result);
+ bool Invalid = false;
+ std::string Spelling = PP->getSpelling(Result, &Invalid);
+ if (Invalid)
+ return true;
+
assert(Spelling[0] == '/' && Spelling[1] == '/' && "Not bcpl comment?");
Spelling[1] = '*'; // Change prefix to "/*".
Spelling += "*/"; // add suffix.
OpenPOWER on IntegriCloud