Skip to content

Commit 65a8fbf

Browse files
committed
[Clang] Set __cpp_explicit_this_parameter
There are not a lot of outstanding known issues with deducing this (besides llvm#95112), so it seems reasonable to claim full support. Fixes llvm#82780
1 parent 63e8a1b commit 65a8fbf

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ Bug Fixes to C++ Support
365365
- Fixed a bug in the substitution of empty pack indexing types. (#GH105903)
366366
- Clang no longer tries to capture non-odr used default arguments of template parameters of generic lambdas (#GH107048)
367367
- Fixed a bug where defaulted comparison operators would remove ``const`` from base classes. (#GH102588)
368+
- ``__cpp_explicit_this_parameter`` is now defined. (#GH82780)
368369

369370

370371
Bug Fixes to AST Handling

clang/lib/Frontend/InitPreprocessor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
753753
Builder.defineMacro("__cpp_if_consteval", "202106L");
754754
Builder.defineMacro("__cpp_multidimensional_subscript", "202211L");
755755
Builder.defineMacro("__cpp_auto_cast", "202110L");
756+
Builder.defineMacro("__cpp_explicit_this_parameter", "202110L");
756757
}
757758

758759
// We provide those C++23 features as extensions in earlier language modes, so

clang/test/Lexer/cxx-features.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
#error "wrong value for __cpp_named_character_escapes"
8282
#endif
8383

84-
#if check(explicit_this_parameter, 0, 0, 0, 0, 0, 0, 0)
84+
#if check(explicit_this_parameter, 0, 0, 0, 0, 0, 202110L, 202110L)
8585
#error "wrong value for __cpp_explicit_this_parameter"
8686
#endif
8787

0 commit comments

Comments
 (0)