[PATCH] D120540: [Driver] Enable to use C++20 modules standalone by -fcxx-modules

Daniel McIntosh via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 30 09:47:41 PDT 2022


DanielMcIntosh-IBM added inline comments.


================
Comment at: clang/test/Driver/modules.cpp:79-86
+// RUN: %clang++ -fcxx-modules -std=c++17 -### %s 2>&1 | FileCheck %s --check-prefix=CHECK-CXX17-MODULES
+// CHECK-CXX17-MODULES: "-fcxx-modules"
+// RUN: %clang++ -fcxx-modules -std=c++14 -### %s 2>&1 | FileCheck %s --check-prefix=CHECK-CXX14-MODULES
+// CHECK-CXX14-MODULES: "-fcxx-modules"
+// RUN: %clang++ -fcxx-modules -std=c++11 -### %s 2>&1 | FileCheck %s --check-prefix=CHECK-CXX11-MODULES
+// CHECK-CXX11-MODULES: "-fcxx-modules"
+// RUN: %clang++ -fcxx-modules -std=c++03 -### %s 2>&1 | FileCheck %s --check-prefix=CHECK-CXX03-MODULES
----------------
1. Do we really need separate check prefixes for each of these? The general practice seems to be to re-use the check prefix if we are expecting the same output (e.g. in this very file we use CHECK-COMPILE twice and CHECK-PRECOMPILE three times)
2. Is there some reason not to pass either `--precompile` or `-S` for any of these tests like we do with the rest of the existing tests? Without that, this test fails when a toolchain doesn't support linking. Based on the rest of this test, I would have guessed that linking is outside the scope of this test?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120540/new/

https://reviews.llvm.org/D120540



More information about the cfe-commits mailing list