brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 929e1f1 Raw
32 lines · plain
1// RUN: rm -rf %t2// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -DgetModuleVersion="epic fail" %s 2>&1 | FileCheck %s3 4@import DependsOnModule;5 6// CHECK: While building module 'DependsOnModule' imported from7// CHECK: While building module 'Module' imported from8// CHECK: error: expected ';' after top level declarator9// CHECK: note: expanded from macro 'getModuleVersion'10// CHECK: fatal error: could not build module 'Module'11// CHECK: fatal error: could not build module 'DependsOnModule'12// CHECK-NOT: error:13 14// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs %s -fdiagnostics-show-note-include-stack 2>&1 | FileCheck -check-prefix=CHECK-REDEF %s15extern int Module;16 17// CHECK-REDEF: In module 'DependsOnModule' imported from18// CHECK-REDEF: In module 'Module' imported from19// CHECK-REDEF: Module.h:15:12: note: previous definition is here20 21// RUN: not %clang_cc1 -Wincomplete-umbrella -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -DgetModuleVersion="epic fail" -serialize-diagnostic-file %t/tmp.diag %s 2>&122// RUN: c-index-test -read-diagnostics %t/tmp.diag 2>&1 | FileCheck -check-prefix=CHECK-SDIAG %s23 24// CHECK-SDIAG: Module.h:9:13: error: expected ';' after top level declarator25// CHECK-SDIAG: build-fail-notes.m:4:9: note: while building module 'DependsOnModule' imported from26// CHECK-SDIAG: DependsOnModule.h:1:10: note: while building module 'Module' imported from27// CHECK-SDIAG: note: expanded from macro 'getModuleVersion'28// CHECK-SDIAG: warning: umbrella header for module 'Module' does not include header 'NotInModule.h' [-Wincomplete-umbrella]29// CHECK-SDIAG: DependsOnModule.h:1:10: fatal: could not build module 'Module'30// CHECK-SDIAG: build-fail-notes.m:4:9: note: while building module 'DependsOnModule' imported from31 32