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

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 27 16:50:28 PST 2023


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 != FnBodyKind::Delete &&
       BodyKind != FnBodyKind::Default && !FD->isInlined()) {
----------------
Would it make sense to use `!isa<FunctionTemplateDecl>(D)` here instead of adding `IsFnTemplate`?


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