llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.02k stars 11.96k forks source link

Using uninitialized value `function_ref.callable` when calling `operator ()` #107750

Open anmyachev opened 2 months ago

anmyachev commented 2 months ago

This is found by Coverity tool.

I believe this field should be initialized to a default value explicitly: https://github.com/llvm/llvm-project/blob/78fa41524b6f6e2696ff21ec50e760311ac939a3/llvm/include/llvm/ADT/STLFunctionalExtras.h#L41

operator (): https://github.com/llvm/llvm-project/blob/78fa41524b6f6e2696ff21ec50e760311ac939a3/llvm/include/llvm/ADT/STLFunctionalExtras.h#L68

moar55 commented 1 month ago

I will take this one :)