diff options
Diffstat (limited to 'include/clang/Sema/TypoCorrection.h')
-rw-r--r-- | include/clang/Sema/TypoCorrection.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/clang/Sema/TypoCorrection.h b/include/clang/Sema/TypoCorrection.h index 3b0385ef2a9d..5bebe52325c6 100644 --- a/include/clang/Sema/TypoCorrection.h +++ b/include/clang/Sema/TypoCorrection.h @@ -230,6 +230,15 @@ public: bool requiresImport() const { return RequiresImport; } void setRequiresImport(bool Req) { RequiresImport = Req; } + /// Extra diagnostics are printed after the first diagnostic for the typo. + /// This can be used to attach external notes to the diag. + void addExtraDiagnostic(PartialDiagnostic PD) { + ExtraDiagnostics.push_back(std::move(PD)); + } + ArrayRef<PartialDiagnostic> getExtraDiagnostics() const { + return ExtraDiagnostics; + } + private: bool hasCorrectionDecl() const { return (!isKeyword() && !CorrectionDecls.empty()); @@ -245,6 +254,8 @@ private: SourceRange CorrectionRange; bool ForceSpecifierReplacement; bool RequiresImport; + + std::vector<PartialDiagnostic> ExtraDiagnostics; }; /// @brief Base class for callback objects used by Sema::CorrectTypo to check |