diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-18 21:10:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-18 21:10:12 +0000 |
commit | 33ab3f6c7e3065550de202088f8f335ecfa16ae1 (patch) | |
tree | 2b42d511b3f30bda32a1b9eee645bbf6aa2f1c70 /lib/Lex/Lexer.cpp | |
parent | 42aa16cccb3d6cd4195ccff9c32d8cb50a25a094 (diff) |
silence some errors that should not apply to .S files on code like:
''
'
'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r-- | lib/Lex/Lexer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp index 0478eebb62..a8a22ebc35 100644 --- a/lib/Lex/Lexer.cpp +++ b/lib/Lex/Lexer.cpp @@ -653,7 +653,7 @@ void Lexer::LexStringLiteral(Token &Result, const char *CurPtr, bool Wide) { C = getAndAdvanceChar(CurPtr, Result); } else if (C == '\n' || C == '\r' || // Newline. (C == 0 && CurPtr-1 == BufferEnd)) { // End of file. - if (!isLexingRawMode()) + if (!isLexingRawMode() && !Features.AsmPreprocessor) Diag(BufferPtr, diag::err_unterminated_string); FormTokenWithChars(Result, CurPtr-1, tok::unknown); return; @@ -687,7 +687,7 @@ void Lexer::LexAngledStringLiteral(Token &Result, const char *CurPtr) { C = getAndAdvanceChar(CurPtr, Result); } else if (C == '\n' || C == '\r' || // Newline. (C == 0 && CurPtr-1 == BufferEnd)) { // End of file. - if (!isLexingRawMode()) + if (!isLexingRawMode() && !Features.AsmPreprocessor) Diag(BufferPtr, diag::err_unterminated_angled_string); FormTokenWithChars(Result, CurPtr-1, tok::unknown); return; @@ -716,7 +716,7 @@ void Lexer::LexCharConstant(Token &Result, const char *CurPtr) { // Handle the common case of 'x' and '\y' efficiently. char C = getAndAdvanceChar(CurPtr, Result); if (C == '\'') { - if (!isLexingRawMode()) + if (!isLexingRawMode() && !Features.AsmPreprocessor) Diag(BufferPtr, diag::err_empty_character); FormTokenWithChars(Result, CurPtr, tok::unknown); return; @@ -737,7 +737,7 @@ void Lexer::LexCharConstant(Token &Result, const char *CurPtr) { C = getAndAdvanceChar(CurPtr, Result); } else if (C == '\n' || C == '\r' || // Newline. (C == 0 && CurPtr-1 == BufferEnd)) { // End of file. - if (!isLexingRawMode()) + if (!isLexingRawMode() && !Features.AsmPreprocessor) Diag(BufferPtr, diag::err_unterminated_char); FormTokenWithChars(Result, CurPtr-1, tok::unknown); return; |