diff --git a/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp b/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp index 3d353518e204..5364f596872e 100644 --- a/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp +++ b/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp @@ -135,8 +135,8 @@ static const std::string &getOptName(const Record *R) { namespace { struct VISIBILITY_HIDDEN CompareOptName { - bool operator()(const Record* A, const Record* B) { - return getOptName(A) < getOptName(B); + bool operator()(const Record* A, const Record* B) const { + return getOptName(A) < getOptName(B); } }; }