[clang] 1b6c1a3 - [NFC] Improve test for clang/test/Modules/GH77953.cpp
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 15 19:32:50 PST 2024
Author: Chuanqi Xu
Date: 2024-01-16T11:32:10+08:00
New Revision: 1b6c1a3bd73be4dd904230c637d65810cf3334cd
URL: https://github.com/llvm/llvm-project/commit/1b6c1a3bd73be4dd904230c637d65810cf3334cd
DIFF: https://github.com/llvm/llvm-project/commit/1b6c1a3bd73be4dd904230c637d65810cf3334cd.diff
LOG: [NFC] Improve test for clang/test/Modules/GH77953.cpp
Generally we'll use `-fsyntax-only` when it is sufficient and we'll use
`expected-no-diagnostics` to test the behavior doesn't trigger any
problems. This patch applies these two improvements to
`clang/test/Modules/GH77953.cpp`.
Added:
Modified:
clang/test/Modules/GH77953.cpp
Removed:
################################################################################
diff --git a/clang/test/Modules/GH77953.cpp b/clang/test/Modules/GH77953.cpp
index aaca8153c3d212..c0c16f00395bce 100644
--- a/clang/test/Modules/GH77953.cpp
+++ b/clang/test/Modules/GH77953.cpp
@@ -4,7 +4,7 @@
// RUN: split-file %s %t
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/a.cppm -o %t/a.pcm
-// RUN: %clang_cc1 -std=c++20 -fmodule-file=a=%t/a.pcm %t/b.cppm
+// RUN: %clang_cc1 -std=c++20 -fmodule-file=a=%t/a.pcm %t/b.cpp -fsyntax-only -verify
//--- a.cppm
export module a;
@@ -22,7 +22,7 @@ struct a {
template struct a<>;
-//--- b.cppm
+//--- b.cpp
+// expected-no-diagnostics
import a;
-
template struct a<int>;
More information about the cfe-commits
mailing list