Author: Kazu Hirata
Date: 2025-07-04T18:38:13-07:00
New Revision: add2c58e6560697262a77c0014e7f825f5935fc9

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

LOG: [Index] Remove an unnecessary cast (NFC) (#146944)

We don't need to cast twice to the same type.

Added: 
    

Modified: 
    clang/lib/Index/IndexBody.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Index/IndexBody.cpp b/clang/lib/Index/IndexBody.cpp
index 98ce6f73ec849..1979117d4695c 100644
--- a/clang/lib/Index/IndexBody.cpp
+++ b/clang/lib/Index/IndexBody.cpp
@@ -69,7 +69,7 @@ class BodyIndexer : public RecursiveASTVisitor<BodyIndexer> {
     while (isa<CastExpr>(*It) || isa<ParenExpr>(*It)) {
       if (auto ICE = dyn_cast<ImplicitCastExpr>(*It)) {
         if (ICE->getCastKind() == CK_LValueToRValue)
-          Roles |= (unsigned)(unsigned)SymbolRole::Read;
+          Roles |= (unsigned)SymbolRole::Read;
       }
       if (It == StmtStack.begin())
         break;


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to