[clang] [C++20][Modules] Restore inliness of constexpr/consteval functions defined in-class (PR #109470)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 21 00:49:41 PDT 2024
================
@@ -9760,8 +9760,8 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
if (getLangOpts().CPlusPlus) {
// The rules for implicit inlines changed in C++20 for methods and friends
// with an in-class definition (when such a definition is not attached to
- // the global module). User-specified 'inline' overrides this (set when
- // the function decl is created above).
+ // the global module). This does not affect declarations, that are already
+ // inline, for example due being declared `inline` or `consteval`
----------------
cor3ntin wrote:
```suggestion
// the global module). This does not affect declarations that are already
// inline (whether explicitly or implicitly by being declared constexpr, etc)
```
https://github.com/llvm/llvm-project/pull/109470
More information about the cfe-commits
mailing list