Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
Qt Creator 15.0.0
-
None
Description
When trying to find all instances of a ctor (constructor),
the
Find References to Symbol under Cursor button
fails to find constructors that are part of
std::shared_ptr or std::make_shared
To reproduce:
CMakeLists.txt
cmake_minimum_required(VERSION 3.18) project(demo LANGUAGES CXX) add_executable(demo main.cpp)
main.cpp
#include <memory> #include <cstdint> class MySuperWonderfulClass { public: MySuperWonderfulClass (uint64_t i) : m_i{i} {} private: uint64_t m_i; }; int main() { std::shared_ptr<MySuperWonderfulClass> obj; obj = std::make_shared<MySuperWonderfulClass>(uint64_t(55)); // ctor!!!!!!!!!!! }
So now right-click in line 7 (on MySuperWonderfulClass ctor definition) and do
Find References to Symbol under Cursor
Unfortunately the only instance found is line 7 itself, but not line 19 where the constructor is actually happening as part of std::make_shared
Actually line 19 with the std::make_shared should also be shown!
Maybe this is a clangd issue??