================
@@ -534,11 +534,24 @@ class LifetimeSafetySemaHelperImpl : public
LifetimeSafetySemaHelper {
return "expression";
}
+ bool isInValidExpr(const Expr *E) {
+ if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) {
+ return DRE->getDecl()->isImplicit();
+ }
+
+ if (const auto *CE = dyn_cast<CallExpr>(E)) {
+ if (const auto *FE = CE->getDirectCallee())
+ return FE->isImplicit();
+ }
----------------
NeKon69 wrote:
Also I have a suspicion that this may not work with function pointers
properly... Can you add a test for that?
https://github.com/llvm/llvm-project/pull/204592
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits