================
@@ -480,6 +485,54 @@ class LifetimeSafetySemaHelperImpl : public 
LifetimeSafetySemaHelper {
     return "";
   }
 
+  const Expr *extractExpr(const Expr *E) {
+    // FIXME: Ideally, this should use IgnoreParenImpCasts().
+    // However, according to the comment on IgnoreParenImpCasts(),
+    // it is not fully equivalent to IgnoreImpCasts() + IgnoreParens().
+    // Once the FIXME in IgnoreParenImpCasts() is resolved,
+    // this can be switched to use IgnoreParenImpCasts().
+    const Expr *PureExpr = E->IgnoreImpCasts()->IgnoreParens();
----------------
NeKon69 wrote:

I looked deeper into the implementation and it seems like it just does
`MTE->getSubExpr();`
Since I am not sure what it will produce, I wrote that comment. Can you try 
doing `IgnoreParenImpCasts` instead? I am very curios how it'll end up.

https://github.com/llvm/llvm-project/blob/7a4d7733ae55ef8ac139d80e2b0f2bd1951ff5c8/clang/include/clang/AST/IgnoreExpr.h#L56-L57

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

Reply via email to