secure-software-engineering / phasar

A LLVM-based static analysis framework.
Other
927 stars 140 forks source link

cannot initialize object parameter of type 'psr::CHAResolver' with an expression of type 'psr::RTAResolver' #562

Closed yurivict closed 1 year ago

yurivict commented 1 year ago
In file included from /usr/ports/devel/phasar/work/phasar-1222/lib/PhasarLLVM/ControlFlow/Resolver/RTAResolver.cpp:17:
/usr/ports/devel/phasar/work/phasar-1222/include/phasar/PhasarLLVM/ControlFlow/Resolver/RTAResolver.h:43:41: error: implicit instantiation of undefined template 'std::vector<const llvm::StructType *>'
  std::vector<const llvm::StructType *> AllocatedStructTypes;
                                        ^
/usr/include/c++/v1/iosfwd:260:28: note: template is declared here
class _LIBCPP_TEMPLATE_VIS vector;
                           ^
/usr/ports/devel/phasar/work/phasar-1222/lib/PhasarLLVM/ControlFlow/Resolver/RTAResolver.cpp:100:25: error: cannot initialize object parameter of type 'psr::CHAResolver' with an expression of type 'psr::RTAResolver'
    return CHAResolver::resolveVirtualCall(CallSite);
                        ^~~~~~~~~~~~~~~~~~
2 errors generated.

Version: 1222 clang-14 llvm-14 FreeBSD 13.1

fabianbs96 commented 1 year ago

Hi @yurivict, there is a #include <vector> missing in RTAResolver.h. This is a known issue and will be fixed by the next PR.

yurivict commented 1 year ago

Thanks, including <vector> helps.