Author: Owen Pan
Date: 2026-01-09T19:58:22-08:00
New Revision: 79c11ef40ce34401d52ce07b2f070fa3e9557781

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

LOG: [clang-format][NFC] Remove redundant checking for null pointer

See https://github.com/llvm/llvm-project/pull/143194#discussion_r2674008700

Added: 
    

Modified: 
    clang/lib/Format/TokenAnnotator.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Format/TokenAnnotator.cpp 
b/clang/lib/Format/TokenAnnotator.cpp
index 2b554e609fa3a..3208d8e28dd86 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -3758,9 +3758,6 @@ static FormatToken *getFunctionName(const AnnotatedLine 
&Line,
     while (auto *Next = skipNameQualifier(Tok))
       Tok = Next;
 
-    if (!Tok)
-      return nullptr;
-
     // Skip the `~` if a destructor name.
     if (Tok->is(tok::tilde)) {
       Tok = Tok->Next;


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to