================
@@ -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:
Thanks for clarification.
Here I am worry about possible `nullptr` dereference at
`Source->getBody()->...` below.
If it really can't be `nullptr` in our case and
`doesThisDeclarationHaveABody()` check is enough, maybe we can add an assertion
for `Source->getBody()`
https://github.com/llvm/llvm-project/pull/227534
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits