Store current primary in diagnostic engine, pass it down via handleDiagnostic. Unformmated.

This commit is contained in:
David Ungar
2019-04-01 22:42:32 -07:00
parent f3948e3cfd
commit 7a0e0ffc8a
23 changed files with 191 additions and 109 deletions

View File

@@ -233,7 +233,8 @@ struct SynParserDiagConsumer: public DiagnosticConsumer {
DiagnosticKind Kind,
StringRef FormatString,
ArrayRef<DiagnosticArgument> FormatArgs,
const DiagnosticInfo &Info) override {
const DiagnosticInfo &Info,
StringRef currentPrimaryInput) override {
assert(Kind != DiagnosticKind::Remark && "Shouldn't see this in parser.");
// The buffer where all char* will point into.
llvm::SmallString<256> Buffer;