[C++20] [Modules] Handle the linkage of defaulted friend function
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Tue, 7 Mar 2023 07:16:23 +0000 (15:16 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Tue, 7 Mar 2023 07:34:33 +0000 (15:34 +0800)
commit6ceb32a66fb429b1e6880b723c4f0103f00e6dbd
tree03d44969990a6033ad5fba71dbc4381211fb6207
parent9b1fe5649e546863adba3fdde158b50a213ea954
[C++20] [Modules] Handle the linkage of defaulted friend function
definition correctly

Close https://github.com/llvm/llvm-project/issues/61067

Previously we will only handle the defaulted member functions as
discardable ODR. But we need to handle defaulted friend function in this
way too. Otherwise we may run into the problems the above issue report
mentions.
clang/lib/AST/ASTContext.cpp
clang/test/Modules/pr61067.cppm [new file with mode: 0644]