Is there a method or tool for searching in C++ based on types in an expression? For example, let's say we have:
m_polydata = Normals->GetOutput(); //NOTE: POSSIBLE LEAK!!
// decltype(m_polydata) is vtkSmartPointer<vtkPolyData>
// decltype(Normals->GetOutput()) is vtkPolyData*
and we know it's often undesirable to assign vtkPolyData* to vtkSmartPointer.
I'd like to search in a bunch of files for expressions of the form:
vtkSmartPointer<vtkPolyData> = vtkPolyData*
or more generally:
LHS<Type1> = RHS<Type2>
Can this kind of search be done in a somewhat easy manner? Maybe there's some Eclipse plugin or GDB wrapper or Visual Studio plugin?