[clang] [analyzer][NFC] Compute callee properties once per CallDescriptionMap lookup (PR #245630)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 24 08:46:40 PST 2026


================
@@ -242,10 +264,18 @@ template <typename T> class CallDescriptionMap {
   /// CallEvent::getNumArgs), the called function if it was called through a
   /// function pointer, and other information not available syntactically.
   [[nodiscard]] const T *lookupAsWritten(const CallExpr &Call) const {
+    return lookupImpl(CallDescription::Callee(Call));
+  }
+
+private:
+  const T *lookupImpl(const CallDescription::Callee &C) const {
+    if (!C.FD)
+      return nullptr;
----------------
steakhal wrote:

Isn't this branch dead?
Maybe we could swap this for an assert.

https://github.com/llvm/llvm-project/pull/245630


More information about the cfe-commits mailing list