[clang] [modules] Implement P3618R0: Allow attaching main to the global module (#146461)
Remove the prior warning for attaching extern "C++" to main.
This commit is contained in:
@@ -336,12 +336,22 @@ DEFAULT_FEATURES = [
|
||||
or platform.system().lower().startswith("aix")
|
||||
# Avoid building on platforms that don't support modules properly.
|
||||
or not hasCompileFlag(cfg, "-Wno-reserved-module-identifier")
|
||||
or not sourceBuilds(
|
||||
cfg,
|
||||
"""
|
||||
# older versions don't support extern "C++", newer versions don't support main in named module.
|
||||
or not (
|
||||
sourceBuilds(
|
||||
cfg,
|
||||
"""
|
||||
export module test;
|
||||
extern "C++" int main(int, char**) { return 0; }
|
||||
""",
|
||||
)
|
||||
or sourceBuilds(
|
||||
cfg,
|
||||
"""
|
||||
export module test;
|
||||
int main(int, char**) { return 0; }
|
||||
""",
|
||||
)
|
||||
),
|
||||
),
|
||||
# The time zone validation tests compare the output of zdump against the
|
||||
|
||||
Reference in New Issue
Block a user