iains added inline comments.

================
Comment at: clang/lib/Sema/SemaDecl.cpp:12957-12958
+  // units.
+  if (getLangOpts().CPlusPlus20 && getLangOpts().CPlusPlusModules &&
+      !ModuleScopes.empty() && ModuleScopes.back().Module->isHeaderUnit()) {
+    if (VDecl->getFormalLinkage() == Linkage::ExternalLinkage &&
----------------
ChuanqiXu wrote:
> `getLangOpts().CPlusPlus20` is redundant. It is also good to define a helper 
> interface `withinHeaderUnit` in Sema (not required).
I do not mind making this change - but note that the constraint is specific to 
C++20 and there are some people who want to remove it (the constraint).  I 
guess  you meant `getCurrentModule()` ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140261/new/

https://reviews.llvm.org/D140261

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to