git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63000 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-01-26 05:30:54 +00:00
Родитель 359cc44754
Коммит 099dd05b57
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -629,10 +629,12 @@ void Preprocessor::HandleLineDirective(Token &Tok) {
// FIXME: do something with the #line info.
}
/// HandleUserDiagnosticDirective - Handle a #warning or #error directive.
///
void Preprocessor::HandleUserDiagnosticDirective(Token &Tok,
bool isWarning) {
if (!CurLexer)
// PTH doesn't emit #warning or #error directives.
if (CurPTHLexer)
return CurPTHLexer->DiscardToEndOfLine();
// Read the rest of the line raw. We do this because we don't want macros
@ -661,6 +663,8 @@ void Preprocessor::HandleIdentSCCSDirective(Token &Tok) {
if (StrTok.isNot(tok::string_literal) &&
StrTok.isNot(tok::wide_string_literal)) {
Diag(StrTok, diag::err_pp_malformed_ident);
if (StrTok.isNot(tok::eom))
DiscardUntilEndOfDirective();
return;
}