[all-commits] [llvm/llvm-project] 8dbb33: [analyzer] Simplify CallEvent castArgToParamTypeIf...

Balazs Benics via All-commits all-commits at lists.llvm.org
Tue Dec 24 08:05:59 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8dbb33762cfb8d8606d28a71293f437ddffee4af
      https://github.com/llvm/llvm-project/commit/8dbb33762cfb8d8606d28a71293f437ddffee4af
  Author: Balazs Benics <benicsbalazs at gmail.com>
  Date:   2024-12-24 (Tue, 24 Dec 2024)

  Changed paths:
    M clang/lib/StaticAnalyzer/Core/CallEvent.cpp

  Log Message:
  -----------
  [analyzer] Simplify CallEvent castArgToParamTypeIfNeeded (#120981)

I noticed recently that this code (that I wrote xD) uses the
`getRuntimeDefinition()` which isn't quite necessary for the simple task
this function was designed for.

Why would it be better not using this API here?
I'm experimenting with improving how virtual functions are inlined,
where depending on our ability of deducing the dynamic type of the
object we may end up with inaccurate type information. Such inaccuracy
would mean that we may have multiple runtime definitions. After that,
this code would become ambiguous.

To resolve this, I decided to refactor this and use a simpler - but
equivalent approach.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list