[clang-tools-extra] 6f0b149 - [clangd] Correct the local variable names to match the code style, NFC

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 14 01:45:36 PST 2022


Author: Haojian Wu
Date: 2022-12-14T10:45:20+01:00
New Revision: 6f0b149f40bb1ae8da4e4584a30c405f92bd27a4

URL: https://github.com/llvm/llvm-project/commit/6f0b149f40bb1ae8da4e4584a30c405f92bd27a4
DIFF: https://github.com/llvm/llvm-project/commit/6f0b149f40bb1ae8da4e4584a30c405f92bd27a4.diff

LOG: [clangd] Correct the local variable names to match the code style, NFC

Added: 
    

Modified: 
    clang-tools-extra/clangd/SemanticHighlighting.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/SemanticHighlighting.cpp b/clang-tools-extra/clangd/SemanticHighlighting.cpp
index f667567407793..1f9f851b2817b 100644
--- a/clang-tools-extra/clangd/SemanticHighlighting.cpp
+++ b/clang-tools-extra/clangd/SemanticHighlighting.cpp
@@ -568,31 +568,31 @@ class CollectExtraHighlightings
 
   bool VisitFunctionDecl(FunctionDecl *D) {
     if (D->isOverloadedOperator()) {
-      const auto addOpDeclToken = [&](SourceLocation Loc) {
+      const auto AddOpDeclToken = [&](SourceLocation Loc) {
         auto &Token = H.addToken(Loc, HighlightingKind::Operator)
                           .addModifier(HighlightingModifier::Declaration);
         if (D->isThisDeclarationADefinition())
           Token.addModifier(HighlightingModifier::Definition);
       };
       const auto Range = D->getNameInfo().getCXXOperatorNameRange();
-      addOpDeclToken(Range.getBegin());
+      AddOpDeclToken(Range.getBegin());
       const auto Kind = D->getOverloadedOperator();
       if (Kind == OO_Call || Kind == OO_Subscript)
-        addOpDeclToken(Range.getEnd());
+        AddOpDeclToken(Range.getEnd());
     }
     return true;
   }
 
   bool VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) {
-    const auto addOpToken = [&](SourceLocation Loc) {
+    const auto AddOpToken = [&](SourceLocation Loc) {
       H.addToken(Loc, HighlightingKind::Operator)
           .addModifier(HighlightingModifier::UserDefined);
     };
-    addOpToken(E->getOperatorLoc());
+    AddOpToken(E->getOperatorLoc());
     const auto Kind = E->getOperator();
     if (Kind == OO_Call || Kind == OO_Subscript) {
       if (auto *Callee = E->getCallee())
-        addOpToken(Callee->getBeginLoc());
+        AddOpToken(Callee->getBeginLoc());
     }
     return true;
   }


        


More information about the cfe-commits mailing list