aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Driver/ToolChains/Clang.cpp2
-rw-r--r--clang/test/Driver/modules-fprebuilt-mdoule-path.cpp7
2 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index a97db90518ac..3587326e0e58 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6588,7 +6588,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// support by default, or just assume that all languages do.
bool HaveModules =
Std && (Std->containsValue("c++2a") || Std->containsValue("c++20") ||
- Std->containsValue("c++latest"));
+ Std->containsValue("c++2b") || Std->containsValue("c++latest"));
RenderModulesOptions(C, D, Args, Input, Output, CmdArgs, HaveModules);
if (Args.hasFlag(options::OPT_fpch_validate_input_files_content,
diff --git a/clang/test/Driver/modules-fprebuilt-mdoule-path.cpp b/clang/test/Driver/modules-fprebuilt-mdoule-path.cpp
new file mode 100644
index 000000000000..a2c830bfda00
--- /dev/null
+++ b/clang/test/Driver/modules-fprebuilt-mdoule-path.cpp
@@ -0,0 +1,7 @@
+// RUN: %clang -std=c++2a -fprebuilt-module-path=. -### -c %s 2>&1 | FileCheck %s
+// RUN: %clang -std=c++20 -fprebuilt-module-path=. -### -c %s 2>&1 | FileCheck %s
+// RUN: %clang -std=c++2b -fprebuilt-module-path=. -### -c %s 2>&1 | FileCheck %s
+// RUN: %clang -std=c++latest -fprebuilt-module-path=. -### -c %s 2>&1 | FileCheck %s
+//
+// CHECK-NOT: warning: argument unused during compilation
+// CHECK: -fprebuilt-module-path=.