aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaLambda.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2024-10-24 10:23:40 +0100
committerGitHub <noreply@github.com>2024-10-24 10:23:40 +0100
commit4dd55c567aaed30c6842812e0798a70fee324c98 (patch)
tree832c5f53b744938b73f6484e3acde01bb1972677 /clang/lib/Sema/SemaLambda.cpp
parente37d736def5b95a2710f92881b5fc8b0494d8a05 (diff)
downloadllvm-4dd55c567aaed30c6842812e0798a70fee324c98.zip
llvm-4dd55c567aaed30c6842812e0798a70fee324c98.tar.gz
llvm-4dd55c567aaed30c6842812e0798a70fee324c98.tar.bz2
[clang] Use {} instead of std::nullopt to initialize empty ArrayRef (#109399)
Follow up to #109133.
Diffstat (limited to 'clang/lib/Sema/SemaLambda.cpp')
-rw-r--r--clang/lib/Sema/SemaLambda.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp
index 7b9d5f4..e7afa0f 100644
--- a/clang/lib/Sema/SemaLambda.cpp
+++ b/clang/lib/Sema/SemaLambda.cpp
@@ -909,8 +909,8 @@ getDummyLambdaType(Sema &S, SourceLocation Loc = SourceLocation()) {
QualType DefaultTypeForNoTrailingReturn = S.getLangOpts().CPlusPlus14
? S.Context.getAutoDeductType()
: S.Context.DependentTy;
- QualType MethodTy = S.Context.getFunctionType(DefaultTypeForNoTrailingReturn,
- std::nullopt, EPI);
+ QualType MethodTy =
+ S.Context.getFunctionType(DefaultTypeForNoTrailingReturn, {}, EPI);
return S.Context.getTrivialTypeSourceInfo(MethodTy, Loc);
}
@@ -1681,8 +1681,7 @@ static void addFunctionPointerConversion(Sema &S, SourceRange IntroducerRange,
ConvExtInfo.TypeQuals = Qualifiers();
ConvExtInfo.TypeQuals.addConst();
ConvExtInfo.ExceptionSpec.Type = EST_BasicNoexcept;
- QualType ConvTy =
- S.Context.getFunctionType(PtrToFunctionTy, std::nullopt, ConvExtInfo);
+ QualType ConvTy = S.Context.getFunctionType(PtrToFunctionTy, {}, ConvExtInfo);
SourceLocation Loc = IntroducerRange.getBegin();
DeclarationName ConversionName
@@ -1864,8 +1863,7 @@ static void addBlockPointerConversion(Sema &S,
/*IsVariadic=*/false, /*IsCXXMethod=*/true));
ConversionEPI.TypeQuals = Qualifiers();
ConversionEPI.TypeQuals.addConst();
- QualType ConvTy =
- S.Context.getFunctionType(BlockPtrTy, std::nullopt, ConversionEPI);
+ QualType ConvTy = S.Context.getFunctionType(BlockPtrTy, {}, ConversionEPI);
SourceLocation Loc = IntroducerRange.getBegin();
DeclarationName Name