aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Frontend
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/unittests/Frontend
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/unittests/Frontend')
-rw-r--r--clang/unittests/Frontend/ASTUnitTest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/unittests/Frontend/ASTUnitTest.cpp b/clang/unittests/Frontend/ASTUnitTest.cpp
index 19b5d9b..bd5d5d0 100644
--- a/clang/unittests/Frontend/ASTUnitTest.cpp
+++ b/clang/unittests/Frontend/ASTUnitTest.cpp
@@ -168,9 +168,9 @@ TEST_F(ASTUnitTest, LoadFromCommandLineEarlyError) {
std::unique_ptr<ASTUnit> AST = ASTUnit::LoadFromCommandLine(
&Args[0], &Args[4], PCHContainerOps, Diags, "", false, "", false,
- CaptureDiagsKind::All, std::nullopt, true, 0, TU_Complete, false, false,
- false, SkipFunctionBodiesScope::None, false, true, false, false,
- std::nullopt, &ErrUnit, nullptr);
+ CaptureDiagsKind::All, {}, true, 0, TU_Complete, false, false, false,
+ SkipFunctionBodiesScope::None, false, true, false, false, std::nullopt,
+ &ErrUnit, nullptr);
ASSERT_EQ(AST, nullptr);
ASSERT_NE(ErrUnit, nullptr);
@@ -195,9 +195,9 @@ TEST_F(ASTUnitTest, LoadFromCommandLineWorkingDirectory) {
std::unique_ptr<ASTUnit> AST = ASTUnit::LoadFromCommandLine(
&Args[0], &Args[4], PCHContainerOps, Diags, "", false, "", false,
- CaptureDiagsKind::All, std::nullopt, true, 0, TU_Complete, false, false,
- false, SkipFunctionBodiesScope::None, false, true, false, false,
- std::nullopt, &ErrUnit, nullptr);
+ CaptureDiagsKind::All, {}, true, 0, TU_Complete, false, false, false,
+ SkipFunctionBodiesScope::None, false, true, false, false, std::nullopt,
+ &ErrUnit, nullptr);
ASSERT_NE(AST, nullptr);
ASSERT_FALSE(Diags->hasErrorOccurred());