[clang] a948117 - [clang] Use has_value instead of value (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 29 21:18:56 PDT 2022
Author: Kazu Hirata
Date: 2022-07-29T21:18:39-07:00
New Revision: a9481170888447176f3552c62ff7dca693c25b97
URL: https://github.com/llvm/llvm-project/commit/a9481170888447176f3552c62ff7dca693c25b97
DIFF: https://github.com/llvm/llvm-project/commit/a9481170888447176f3552c62ff7dca693c25b97.diff
LOG: [clang] Use has_value instead of value (NFC)
Added:
Modified:
clang/lib/Driver/OffloadBundler.cpp
clang/lib/Sema/Scope.cpp
clang/lib/Sema/SemaRISCVVectorLookup.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/OffloadBundler.cpp b/clang/lib/Driver/OffloadBundler.cpp
index 5aa4cb8c2cac2..d590c2360fae8 100644
--- a/clang/lib/Driver/OffloadBundler.cpp
+++ b/clang/lib/Driver/OffloadBundler.cpp
@@ -1249,7 +1249,7 @@ Error OffloadBundler::UnbundleArchive() {
if (!NextTripleOrErr)
return NextTripleOrErr.takeError();
- CodeObject = ((*NextTripleOrErr).hasValue()) ? **NextTripleOrErr : "";
+ CodeObject = ((*NextTripleOrErr).has_value()) ? **NextTripleOrErr : "";
} // End of processing of all bundle entries of this child of input archive.
} // End of while over children of input archive.
diff --git a/clang/lib/Sema/Scope.cpp b/clang/lib/Sema/Scope.cpp
index 98260226dfd36..69120cf644342 100644
--- a/clang/lib/Sema/Scope.cpp
+++ b/clang/lib/Sema/Scope.cpp
@@ -156,7 +156,7 @@ void Scope::updateNRVOCandidate(VarDecl *VD) {
void Scope::applyNRVO() {
// There is no NRVO candidate in the current scope.
- if (!NRVO.hasValue())
+ if (!NRVO.has_value())
return;
if (*NRVO && isDeclScope(*NRVO))
diff --git a/clang/lib/Sema/SemaRISCVVectorLookup.cpp b/clang/lib/Sema/SemaRISCVVectorLookup.cpp
index 50fd841c231bf..2d58008fcdacd 100644
--- a/clang/lib/Sema/SemaRISCVVectorLookup.cpp
+++ b/clang/lib/Sema/SemaRISCVVectorLookup.cpp
@@ -233,7 +233,7 @@ void RISCVIntrinsicManagerImpl::InitIntrinsicList() {
RVVType::computeTypes(BaseType, Log2LMUL, Record.NF, ProtoSeq);
// Ignored to create new intrinsic if there are any illegal types.
- if (!Types.hasValue())
+ if (!Types.has_value())
continue;
std::string SuffixStr =
More information about the cfe-commits
mailing list