[clang] f3fbbe1 - [clang][analyzer][NFC] Use value_or instead of ValueOr

David Spickett via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 26 02:21:07 PDT 2022


Author: David Spickett
Date: 2022-07-26T09:16:45Z
New Revision: f3fbbe1cf33bf4da8e2620c770997d9ff68a5384

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

LOG: [clang][analyzer][NFC] Use value_or instead of ValueOr

The latter is deprecated.

Added: 
    

Modified: 
    clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
index 836311a69309..04e00274b2a7 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
@@ -589,7 +589,7 @@ void ExprEngine::handleConstructor(const Expr *E,
 
     unsigned Idx = 0;
     if (CE->getType()->isArrayType() || AILE) {
-      Idx = getIndexOfElementToConstruct(State, CE, LCtx).getValueOr(0u);
+      Idx = getIndexOfElementToConstruct(State, CE, LCtx).value_or(0u);
       State = setIndexOfElementToConstruct(State, CE, LCtx, Idx + 1);
     }
 


        


More information about the cfe-commits mailing list