forked from OSchip/llvm-project
Fix another invalid getCustomDiagID() use to unbreak the build
It was calling the utility wrapper that now requires a constant string following clang r200132. The StringRef version on DiagnosticIDs appears to have been what was intended so change to that. llvm-svn: 200142
This commit is contained in:
parent
6f39ce4be2
commit
a143676664
|
@ -76,7 +76,7 @@ public:
|
||||||
void setContext(ClangTidyContext *Ctx) { Context = Ctx; }
|
void setContext(ClangTidyContext *Ctx) { Context = Ctx; }
|
||||||
|
|
||||||
/// \brief Add a diagnostic with the check's name.
|
/// \brief Add a diagnostic with the check's name.
|
||||||
DiagnosticBuilder diag(SourceLocation Loc, StringRef Message);
|
DiagnosticBuilder diag(SourceLocation Loc, StringRef Description);
|
||||||
|
|
||||||
/// \brief Sets the check name. Intended to be used by the clang-tidy
|
/// \brief Sets the check name. Intended to be used by the clang-tidy
|
||||||
/// framework. Can be called only once.
|
/// framework. Can be called only once.
|
||||||
|
|
|
@ -39,9 +39,9 @@ ClangTidyError::ClangTidyError(StringRef CheckName,
|
||||||
|
|
||||||
DiagnosticBuilder ClangTidyContext::diag(StringRef CheckName,
|
DiagnosticBuilder ClangTidyContext::diag(StringRef CheckName,
|
||||||
SourceLocation Loc,
|
SourceLocation Loc,
|
||||||
StringRef Message) {
|
StringRef Description) {
|
||||||
unsigned ID =
|
unsigned ID = DiagEngine->getDiagnosticIDs()->getCustomDiagID(
|
||||||
DiagEngine->getCustomDiagID(DiagnosticsEngine::Warning, Message);
|
DiagnosticIDs::Warning, Description);
|
||||||
if (CheckNamesByDiagnosticID.count(ID) == 0)
|
if (CheckNamesByDiagnosticID.count(ID) == 0)
|
||||||
CheckNamesByDiagnosticID.insert(std::make_pair(ID, CheckName.str()));
|
CheckNamesByDiagnosticID.insert(std::make_pair(ID, CheckName.str()));
|
||||||
return DiagEngine->Report(Loc, ID);
|
return DiagEngine->Report(Loc, ID);
|
||||||
|
|
Loading…
Reference in New Issue