Skip to content

Commit 465e613

Browse files
committed
Address review feedback from Bigcheese
1 parent 499416f commit 465e613

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,9 +577,6 @@ def err_drv_reduced_module_output_overrided : Warning<
577577
"please consider use '-fmodule-output=' to specify the output file for reduced BMI explicitly">,
578578
InGroup<DiagGroup<"reduced-bmi-output-overrided">>;
579579

580-
def remark_fmodules_driver_enabled : Remark<
581-
"support for explicit module builds enabled (experimental)">,
582-
InGroup<ModulesDriver>;
583580
def remark_found_cxx20_module_usage : Remark<
584581
"found C++20 module usage in file '%0'">,
585582
InGroup<ModulesDriver>;

clang/lib/Driver/Driver.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4519,9 +4519,9 @@ static bool scanBufferForCXXModuleUsage(const llvm::MemoryBuffer &Buffer) {
45194519
const char *Ptr = Buffer.getBufferStart();
45204520
skipToRelevantCXXModuleText(Ptr);
45214521

4522-
// Check if buffer has enough bytes left to check for the module-related
4523-
// declaration fragment we want to check without making potentially
4524-
// memory-mapped buffer load unnecessary pages.
4522+
// Check if the buffer has enough remaining bytes left for any of the
4523+
// module-related declaration fragments we are checking for, without making
4524+
// the potentially memory-mapped buffer load unnecessary pages.
45254525
constexpr int MinKeywordLength = 6;
45264526
const char *Begin = Ptr;
45274527
for (int i = 0; i < MinKeywordLength; ++i) {
@@ -4592,7 +4592,6 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
45924592

45934593
if (Args.hasFlag(options::OPT_fmodules_driver,
45944594
options::OPT_fno_modules_driver, false)) {
4595-
Diags.Report(diag::remark_fmodules_driver_enabled);
45964595
// TODO: Move the logic for implicitly enabling explicit-module-builds out
45974596
// of -fmodules-driver once it is no longer experimental.
45984597
// Currently, this serves diagnostic purposes only.
@@ -4611,7 +4610,7 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
46114610
return;
46124611
}
46134612

4614-
Driver::BuildDefaultActions(C, Args, Inputs, Actions);
4613+
BuildDefaultActions(C, Args, Inputs, Actions);
46154614
}
46164615

46174616
void Driver::BuildDefaultActions(Compilation &C, DerivedArgList &Args,

clang/test/Driver/modules-driver-cxx20-module-usage-scanner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ module/*a comment*/;
7777
#endif
7878
#pragma once;
7979
#include <iostream>
80-
export module m;
80+
import m;
8181

8282
//--- multiline-directive.cpp
8383
// RUN: %clang -std=c++23 -ccc-print-phases -fmodules-driver -Rmodules-driver \

0 commit comments

Comments
 (0)