[all-commits] [llvm/llvm-project] 97af17: re-land [C++20][Modules] Update handling of implic...
iains via All-commits
all-commits at lists.llvm.org
Thu Jul 21 01:18:25 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 97af17c5cae64f5fd5e89806e8cf20f50fec30ec
https://github.com/llvm/llvm-project/commit/97af17c5cae64f5fd5e89806e8cf20f50fec30ec
Author: Iain Sandoe <iain at sandoe.co.uk>
Date: 2022-07-21 (Thu, 21 Jul 2022)
Changed paths:
M clang/lib/AST/TextNodeDumper.cpp
M clang/lib/Sema/SemaDecl.cpp
M clang/test/AST/ast-dump-constant-expr.cpp
M clang/test/AST/ast-dump-lambda.cpp
A clang/test/CXX/class/class.friend/p7-cxx20.cpp
A clang/test/CXX/class/class.mfct/p1-cxx20.cpp
Log Message:
-----------
re-land [C++20][Modules] Update handling of implicit inlines [P1779R3]
re-land fixes an unwanted interaction with module-map modules, seen in
Greendragon testing.
This provides updates to
[class.mfct]:
Pre C++20 [class.mfct]p2:
A member function may be defined (8.4) in its class definition, in
which case it is an inline member function (7.1.2)
Post C++20 [class.mfct]p1:
If a member function is attached to the global module and is defined
in its class definition, it is inline.
and
[class.friend]:
Pre-C++20 [class.friend]p5
A function can be defined in a friend declaration of a
class . . . . Such a function is implicitly inline.
Post C++20 [class.friend]p7
Such a function is implicitly an inline function if it is attached
to the global module.
We add the output of implicit-inline to the TextNodeDumper, and amend
a couple of existing tests to account for this, plus add tests for the
cases covered above.
Differential Revision: https://reviews.llvm.org/D129045
More information about the All-commits
mailing list