================
@@ -400,7 +400,7 @@ class DefineInline : public Tweak {
if (!SelNode)
return false;
Source = getSelectedFunction(SelNode);
- if (!Source || !Source->hasBody())
+ if (!Source || !Source->doesThisDeclarationHaveABody())
----------------
ArcsinX wrote:
I think in this assertion we need a clear message what we expect and why. I.e.
we use `doesThisDeclarationHaveABody()` check and based on the result expect
non-null function body. Possible cause guessing maybe not very suitable here,
because in a future `doesThisDeclarationHaveABody()` there can be more cases
when it can returns `true`.
So, maybe "Expected non-null body for declaration satisfying
doesThisDeclarationHaveABody()" or "Function declaration with a body must have
a body Stmt".
https://github.com/llvm/llvm-project/pull/227534
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits