[clang-tools-extra] 77d3b14 - [clangd] Fix an inconsistent ReasonToReject enum usage, NFC.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 6 01:23:39 PDT 2020
Author: Haojian Wu
Date: 2020-10-06T10:17:47+02:00
New Revision: 77d3b14458dd2aaafa20e6172a893cf0abab6453
URL: https://github.com/llvm/llvm-project/commit/77d3b14458dd2aaafa20e6172a893cf0abab6453
DIFF: https://github.com/llvm/llvm-project/commit/77d3b14458dd2aaafa20e6172a893cf0abab6453.diff
LOG: [clangd] Fix an inconsistent ReasonToReject enum usage, NFC.
Added:
Modified:
clang-tools-extra/clangd/refactor/Rename.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/refactor/Rename.cpp b/clang-tools-extra/clangd/refactor/Rename.cpp
index c48bc2856cb7..9de3302564fd 100644
--- a/clang-tools-extra/clangd/refactor/Rename.cpp
+++ b/clang-tools-extra/clangd/refactor/Rename.cpp
@@ -113,7 +113,7 @@ bool isExcluded(const NamedDecl &RenameDecl) {
return StdSymbols->count(printQualifiedName(RenameDecl));
}
-enum ReasonToReject {
+enum class ReasonToReject {
NoSymbolFound,
NoIndexProvided,
NonIndexable,
@@ -206,7 +206,7 @@ llvm::Error makeError(ReasonToReject Reason) {
return "symbol may be used in other files (not eligible for indexing)";
case ReasonToReject::UnsupportedSymbol:
return "symbol is not a supported kind (e.g. namespace, macro)";
- case AmbiguousSymbol:
+ case ReasonToReject::AmbiguousSymbol:
return "there are multiple symbols at the given location";
}
llvm_unreachable("unhandled reason kind");
More information about the cfe-commits
mailing list