diff options
author | Amr Hesham <amr96@programmer.net> | 2025-06-27 22:39:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-27 22:39:28 +0200 |
commit | f20ef8520ddc5c8dfa925b7a6be3aad7622ffc17 (patch) | |
tree | 0c829a1fc64a1cac2b2ce367601f9c0e1c0164f1 /clang/lib | |
parent | 98f7d756e334278e2e34177fa11e5a604d3b01ff (diff) | |
download | llvm-f20ef8520ddc5c8dfa925b7a6be3aad7622ffc17.zip llvm-f20ef8520ddc5c8dfa925b7a6be3aad7622ffc17.tar.gz llvm-f20ef8520ddc5c8dfa925b7a6be3aad7622ffc17.tar.bz2 |
[CIR][NFC] Fix init llvm::ArrayRef warning (#146147)
Fix init llvm::ArrayRef deprecation warning when initialized with
std::nullopt
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CIR/CodeGen/CIRGenCall.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CIR/CodeGen/CIRGenFunction.h | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/CIR/CodeGen/CIRGenCall.cpp b/clang/lib/CIR/CodeGen/CIRGenCall.cpp index 9c9c966..163d0db 100644 --- a/clang/lib/CIR/CodeGen/CIRGenCall.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenCall.cpp @@ -404,7 +404,7 @@ CIRGenTypes::arrangeFunctionDeclaration(const FunctionDecl *fd) { funcTy.getAs<FunctionNoProtoType>()) { assert(!cir::MissingFeatures::opCallCIRGenFuncInfoExtParamInfo()); assert(!cir::MissingFeatures::opCallFnInfoOpts()); - return arrangeCIRFunctionInfo(noProto->getReturnType(), std::nullopt, + return arrangeCIRFunctionInfo(noProto->getReturnType(), {}, RequiredArgs::All); } diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.h b/clang/lib/CIR/CodeGen/CIRGenFunction.h index 7e6fdf1..759b83c 100644 --- a/clang/lib/CIR/CodeGen/CIRGenFunction.h +++ b/clang/lib/CIR/CodeGen/CIRGenFunction.h @@ -894,9 +894,8 @@ public: // Build CIR for a statement. useCurrentScope should be true if no // new scopes need be created when finding a compound statement. - mlir::LogicalResult - emitStmt(const clang::Stmt *s, bool useCurrentScope, - llvm::ArrayRef<const Attr *> attrs = std::nullopt); + mlir::LogicalResult emitStmt(const clang::Stmt *s, bool useCurrentScope, + llvm::ArrayRef<const Attr *> attrs = {}); mlir::LogicalResult emitSimpleStmt(const clang::Stmt *s, bool useCurrentScope); |