[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-02-02 Thread Iain Sandoe via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGcdd44e2c8554: [C++20][Modules] Handle template declarations in header units. (authored by iains). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142704/new/ https://reviews.llvm.org/D142704

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-31 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:15265 FD->getFormalLinkage() == Linkage::ExternalLinkage && - !FD->isInvalidDecl() && BodyKind != FnBodyKind::Delete && + !FD->isInvalidDecl() && !IsFnTemplate && BodyKind != FnBodyKind::Delete

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-31 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 493546. iains marked 2 inline comments as done. iains added a comment. rebased, added tests for instantiated variable/function templates. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142704/new/

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D142704#4092724 , @iains wrote: > I think we need to find a way to proceed - because this causes a regression > on the llvm-16 branch, and that should be resolved soon, if possible. > What is your suggestion for a way

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-30 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. I think we need to find a way to proceed - because this causes a regression on the llvm-16 branch, and that should be resolved soon, if possible. What is your suggestion for a way forward? Comment at: clang/lib/Sema/SemaDecl.cpp:15265

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-30 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. I think we need to find a way to proceed - because this causes a regression on the llvm-16 branch, and that should be resolved soon, if possible. What is your suggestion for a way forward? Comment at: clang/lib/Sema/SemaDecl.cpp:15265

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:15265 FD->getFormalLinkage() == Linkage::ExternalLinkage && - !FD->isInvalidDecl() && BodyKind != FnBodyKind::Delete && + !FD->isInvalidDecl() && !IsFnTemplate && BodyKind !=

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-29 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. AFAICT the failing test is unrelated to this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142704/new/ https://reviews.llvm.org/D142704 ___ cfe-commits mailing list

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-28 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked an inline comment as done. iains added a comment. In D142704#4088217 , @Arthapz wrote: > tried the patch and it seems to work with libstdc++ but not with libc++ > > > > rm -rf .xmake build; xmake f --toolchain=clang >

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-28 Thread Arthur Laurent via Phabricator via cfe-commits
Arthapz added a comment. tried the patch and it seems to work with libstdc++ but not with libc++ > rm -rf .xmake build; xmake f --toolchain=clang; xmake b checking for platform ... linux checking for architecture ... x86_64 [ 0%]: generating.module.deps src/main.cpp [ 4%]:

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-28 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked an inline comment as done. iains added a comment. in my local testing, I was able to consume all libc++ headers individually. Comment at: clang/lib/Sema/SemaDecl.cpp:15265 FD->getFormalLinkage() == Linkage::ExternalLinkage && - !FD->isInvalidDecl() &&

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-28 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 493014. iains added a comment. rebased, and revised to handle variable templates and instantiations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142704/new/ https://reviews.llvm.org/D142704 Files:

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:15265 FD->getFormalLinkage() == Linkage::ExternalLinkage && - !FD->isInvalidDecl() && BodyKind != FnBodyKind::Delete && + !FD->isInvalidDecl() && !IsFnTemplate && BodyKind !=

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-27 Thread Iain Sandoe via Phabricator via cfe-commits
iains planned changes to this revision. iains added a comment. this is necessary, but not sufficient (I need to make additions) .. no need to review yet. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142704/new/ https://reviews.llvm.org/D142704

[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

2023-01-27 Thread Iain Sandoe via Phabricator via cfe-commits
iains created this revision. Herald added a project: All. iains added reviewers: dblaikie, ChuanqiXu. iains published this revision for review. iains added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. @dblaikie - I suspect that this would be useful on the