[clang] dcab84f - Reland [clang-format][NFC] Remove a redundant isLiteral() call

Gulfem Savrun Yeniceri via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 20 20:17:34 PST 2023


Author: Owen Pan
Date: 2023-11-21T04:17:03Z
New Revision: dcab84fd5e0dcd9f5210dc024c2a2081cfb2e87e

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

LOG: Reland [clang-format][NFC] Remove a redundant isLiteral() call

Added: 
    

Modified: 
    clang/lib/Format/TokenAnnotator.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 1d00dc569bb840e..cfca7c00312aab3 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -3409,10 +3409,8 @@ static bool isFunctionDeclarationName(bool IsCpp, const FormatToken &Current,
         Tok->isOneOf(TT_PointerOrReference, TT_StartOfName, tok::ellipsis)) {
       return true;
     }
-    if (Tok->isOneOf(tok::l_brace, tok::string_literal, TT_ObjCMethodExpr) ||
-        Tok->Tok.isLiteral()) {
+    if (Tok->isOneOf(tok::l_brace, TT_ObjCMethodExpr) || Tok->Tok.isLiteral())
       return false;
-    }
   }
   return false;
 }


        


More information about the cfe-commits mailing list