[PATCH] D152246: [clang][ThreadSafety] Analyze known function pointer values

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 8 07:41:10 PDT 2023


aaron.ballman added a comment.

> I think ideally we would get all possible values at this point and analyze them all(?), but I'm not sure how to implement this.

Err, if we don't know the callee, there's not a whole lot we can do. I don't think we'd want to make guesses at what potentially could be stored in the function pointer at that point.

Overall, though, I think this direction makes sense, but I'd like to hear from @aaronpuchert and/or @delesley.



================
Comment at: clang/lib/Analysis/ThreadSafety.cpp:2066-2070
+  const auto *CD = Exp->getCalleeDecl();
+  if (!CD)
+    return;
+
+  const auto *D = dyn_cast<NamedDecl>(CD);
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152246/new/

https://reviews.llvm.org/D152246



More information about the cfe-commits mailing list