================

----------------
ArcsinX wrote:

Maybe we also need a `doesThisDeclarationHaveABody()` check here (but for 
`Target`).

Otherwise, in case of duplicated definitions, trigger `DefineInline` not at the 
first definition will lead to the same error.
E.g.
```cpp
// error-ok

void func() {} // Target
void fu^nc {} // Source
// Target != Source => prepare() returns true
```

Moreover, maybe instead of `doesThisDeclarationHaveABody()` we should use 
`isThisDeclarationADefinition()`, which also returns `true` if 
`isDeletedAsWritten()` is `true` to handle cases like this:
```cpp
// error-ok
void func() = delete; // Target
void fu^nc() {} // Source
```

https://github.com/llvm/llvm-project/pull/227534
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to