Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion clang/lib/Frontend/InitPreprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,10 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
Builder.defineMacro("__cpp_impl_coroutine", "201902L");
Builder.defineMacro("__cpp_designated_initializers", "201707L");
Builder.defineMacro("__cpp_impl_three_way_comparison", "201907L");
//Builder.defineMacro("__cpp_modules", "201907L");
// Intentionally to set __cpp_modules to 1.
// See https://github.com/llvm/llvm-project/issues/71364 for details.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit uncomfortable just putting a link w/o at least a TL;DR; giving a high level explanation here.

// Builder.defineMacro("__cpp_modules", "201907L");
Builder.defineMacro("__cpp_modules", "1");
Builder.defineMacro("__cpp_using_enum", "201907L");
}
// C++23 features.
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Lexer/cxx-features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@

// init_captures checked below

#if check(modules, 0, 0, 0, 0, 0, 0, 0)
#if check(modules, 0, 0, 0, 0, 1, 1, 1)
// FIXME: 201907 in C++20
#error "wrong value for __cpp_modules"
#endif
Expand Down
Loading