@@ -72,6 +72,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
7272
7373 try await tester. checkBuild ( runDestination: . macOS, persistent: true ) { results in
7474 results. checkNoTask ( . matchRuleType( " ScanDependencies " ) )
75+ results. checkedWarnings = true
7576 }
7677 }
7778 }
@@ -146,6 +147,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
146147 try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/t.cpp " ) ) { stream in
147148 stream <<<
148149 """
150+ void foo(void) {}
149151 """
150152 }
151153
@@ -353,7 +355,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
353355 do {
354356 let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
355357 try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
356- stream <<< " "
358+ stream <<< " void foo(void) {} "
357359 }
358360
359361 let arena = ArenaInfo . buildArena ( derivedDataRoot: derivedDataPath)
@@ -370,7 +372,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
370372 do {
371373 let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
372374 try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
373- stream <<< " "
375+ stream <<< " void foo(void) {} "
374376 }
375377
376378 try await tester. checkBuild ( runDestination: . macOS) { results in
@@ -440,7 +442,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
440442 do {
441443 let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
442444 try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
443- stream <<< " "
445+ stream <<< " void foo(void) {} "
444446 }
445447
446448 let arena = ArenaInfo . buildArena ( derivedDataRoot: derivedDataPath)
@@ -459,7 +461,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
459461 do {
460462 let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
461463 try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
462- stream <<< " "
464+ stream <<< " void foo(void) {} "
463465 }
464466
465467 try await tester. checkBuild ( runDestination: . macOS) { results in
@@ -541,7 +543,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
541543 do {
542544 let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
543545 try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
544- stream <<< " "
546+ stream <<< " void foo(void) {} "
545547 }
546548
547549 let arena = ArenaInfo . buildArena ( derivedDataRoot: derivedDataPath)
@@ -562,7 +564,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
562564 do {
563565 let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
564566 try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
565- stream <<< " "
567+ stream <<< " void foo(void) {} "
566568 }
567569
568570 try await tester. checkBuild ( runDestination: . macOS) { results in
@@ -618,7 +620,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
618620 do {
619621 let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
620622 try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
621- stream <<< " "
623+ stream <<< " void foo(void) {} "
622624 }
623625
624626 try await tester. fs. writeFileContents ( blockListFilePath) { file in
@@ -644,7 +646,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
644646 do {
645647 let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
646648 try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
647- stream <<< " "
649+ stream <<< " void foo(void) {} "
648650 }
649651
650652 try await tester. fs. writeFileContents ( blockListFilePath) { file in
@@ -1550,6 +1552,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
15501552 stream <<<
15511553 """
15521554 #include " other.h "
1555+ void foo(void) {}
15531556 """
15541557 }
15551558 try await tester. fs. writeFileContents ( moduleDir. join ( " other.h " ) ) { stream in
@@ -1762,7 +1765,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
17621765 """
17631766 }
17641767 try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/generated1.c.fake-customrule " ) ) { stream in
1765- stream <<< " "
1768+ stream <<< " void foo(void) {} "
17661769 }
17671770
17681771 try await tester. checkBuild ( runDestination: . macOS) { results in
@@ -1813,6 +1816,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
18131816 try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/t.c " ) ) { stream in
18141817 stream <<<
18151818 """
1819+ void foo(void) {}
18161820 """
18171821 }
18181822
0 commit comments