================
@@ -544,13 +580,13 @@ void UseAfterMoveCheck::check(const
MatchFinder::MatchResult &Result) {
// Ignore the std::move if the variable that was passed to it isn't a local
// variable.
- if (!Arg->getDecl()->getDeclContext()->isFunctionOrMethod())
+ if (Arg && !Arg->getDecl()->getDeclContext()->isFunctionOrMethod())
return;
// Collect all code blocks that could use the arg after move.
----------------
zwuis wrote:
Please update the comment to explain the meaning of the stored `const Decl *`.
https://github.com/llvm/llvm-project/pull/172566
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits