[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.
Iain Sandoe via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 28 09:59:33 PST 2023
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() && BodyKind != FnBodyKind::Delete &&
+ !FD->isInvalidDecl() && !IsFnTemplate && BodyKind != FnBodyKind::Delete &&
BodyKind != FnBodyKind::Default && !FD->isInlined()) {
----------------
rsmith wrote:
> Would it make sense to use `!isa<FunctionTemplateDecl>(D)` here instead of adding `IsFnTemplate`?
> Would it make sense to use `!isa<FunctionTemplateDecl>(D)` here instead of adding `IsFnTemplate`?
I have changed this to use FD->isTemplated() to match the changes for VarDecls - where the template decl is not available. Would it be better to use the isa<>() ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142704/new/
https://reviews.llvm.org/D142704
More information about the cfe-commits
mailing list