[clang] 182e1c7 - [NFC] Update test for clang/test/Modules/cxx20-force-check-input.cppm

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 8 00:55:15 PDT 2024


Author: Chuanqi Xu
Date: 2024-08-08T15:52:29+08:00
New Revision: 182e1c773421e097d42415fc4d9aee1fb431819a

URL: https://github.com/llvm/llvm-project/commit/182e1c773421e097d42415fc4d9aee1fb431819a
DIFF: https://github.com/llvm/llvm-project/commit/182e1c773421e097d42415fc4d9aee1fb431819a.diff

LOG: [NFC] Update test for clang/test/Modules/cxx20-force-check-input.cppm

The original test is stale. Update it.

Added: 
    

Modified: 
    clang/test/Modules/cxx20-force-check-input.cppm

Removed: 
    


################################################################################
diff  --git a/clang/test/Modules/cxx20-force-check-input.cppm b/clang/test/Modules/cxx20-force-check-input.cppm
index 4611f8f7cafa1..312f9b1990bc2 100644
--- a/clang/test/Modules/cxx20-force-check-input.cppm
+++ b/clang/test/Modules/cxx20-force-check-input.cppm
@@ -2,19 +2,18 @@
 // RUN: split-file %s %t
 //
 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
+// RUN:     -fforce-check-cxx20-modules-input-files \
 // RUN:     %t/a.cppm -emit-module-interface -o %t/a.pcm
 //
 // RUN: echo "inline int bar = 46;" >> %t/foo.h
-// RUNX: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
-// RUNX:     %t/use.cpp -fmodule-file=a=%t/a.pcm -verify -fsyntax-only
-// RUNX: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
-// RUNX:     %t/a.pcm -emit-llvm -o - | FileCheck %t/a.ll
-//
+// RUN: not %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
+// RUN:     -fforce-check-cxx20-modules-input-files %t/a.pcm \
+// RUN:     -emit-llvm -o -  2>&1 | FileCheck %t/a.cppm -check-prefix=CHECK-HEADER-FAILURE
+// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
+// RUN:     -fforce-check-cxx20-modules-input-files \
+// RUN:     %t/a.cppm -emit-module-interface -o %t/a.pcm
+
 // RUN: echo "export int var = 43;" >> %t/a.cppm
-// RUNX: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
-// RUNX:     %t/use.cpp -fmodule-file=a=%t/a.pcm -verify -fsyntax-only
-// RUNX: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
-// RUNX:     %t/a.pcm -emit-llvm -o - | FileCheck %t/a.ll
 //
 // RUN: not %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
 // RUN:     -fforce-check-cxx20-modules-input-files %t/a.pcm \
@@ -30,4 +29,5 @@ module;
 export module a;
 export using ::foo;
 
+// CHECK-HEADER-FAILURE: fatal error:{{.*}}foo.h' has been modified since the AST file {{.*}}was built
 // CHECK-FAILURE: fatal error:{{.*}}a.cppm' has been modified since the AST file {{.*}}was built


        


More information about the cfe-commits mailing list