================
@@ -347,6 +351,13 @@ void FactsGenerator::VisitUnaryOperator(const 
UnaryOperator *UO) {
   switch (UO->getOpcode()) {
   case UO_AddrOf: {
     const Expr *SubExpr = UO->getSubExpr();
+    // Function addresses do not need lifetime tracking.
+    if (SubExpr->getType()->isFunctionType())
+      return;
+    // Skip address-of on void expressions: GNU C permits them, but void itself
+    // has no origins to track.
+    if (IsCMode && SubExpr->getType()->isVoidType())
----------------
usx95 wrote:

Should we do that do C++ as well ? I do not see a strong reason to support 
address-of void in C++.

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

Reply via email to