================
@@ -2572,7 +2572,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(
   // Friend function defined withing class template may stop being function
   // definition during AST merges from different modules, in this case decl
   // with function body should be used for instantiation.
-  if (isFriend) {
+  if (isFriend && D->hasOwningModule()) {
----------------
mizvekov wrote:

Oh yes, I took the last free bit in FunctionDeclBits a couple of months ago :)

This is a tall order, but it may be possible to make room in there. For example:

```C++
    LLVM_PREFERRED_TYPE(bool)
    uint64_t IsDefaulted : 1;
    LLVM_PREFERRED_TYPE(bool)
    uint64_t IsExplicitlyDefaulted : 1;
 ```
 
 It looks like `IsExplicitlyDefaulted` only makes sense if `IsDefaulted` is 
true, and maybe your new stuff only makes sense if `IsDefaulted` is false, so 
you can
probably share the `IsExplicitlyDefaulted` bit.

if that doesn't work, there are some other potential candidates.

For example, some bit fields only make sense if the function has a body, like 
`UsesSEHTry`, and these bits would probably be free for you as well.

https://github.com/llvm/llvm-project/pull/132214
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to