Made the "expected string literal" diagnostic more expressive
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168267 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index 52d6bb6..9488584 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -691,10 +691,12 @@
}
bool Preprocessor::FinishLexStringLiteral(Token &Result, std::string &String,
+ const char *DiagnosticTag,
bool AllowMacroExpansion) {
// We need at least one string literal.
if (Result.isNot(tok::string_literal)) {
- Diag(Result, diag::err_expected_string_literal);
+ Diag(Result, diag::err_expected_string_literal)
+ << /*Source='in...'*/0 << DiagnosticTag;
return false;
}
@@ -720,7 +722,8 @@
return false;
if (Literal.Pascal) {
- Diag(StrToks[0].getLocation(), diag::err_expected_string_literal);
+ Diag(StrToks[0].getLocation(), diag::err_expected_string_literal)
+ << /*Source='in...'*/0 << DiagnosticTag;
return false;
}