Is the VC++ code DOM accessible from VS addons?

Robin Rodricks picture Robin Rodricks · Apr 9, 2014 · Viewed 8k times · Source

Visual Studio IntelliSense for VC++ includes the "complete" EDG C++ parser (also used by Intel and others). Since the C# Code DOM is accessible to addons (correct me if I'm wrong), is the C++ Code DOM also accessible? Can this be used to analyse an open VC++ project within the VS environment?

Answer

Robin Rodricks picture Robin Rodricks · Apr 24, 2014

The Visual C++ Refactoring extension is able to rename a member project-wide. Its built by MS but obviously they used the internal Code DOM to achieve this. So it is possible, I just don't know how, yet.

The CppLister extension is able to read the intellisense databases created by VS to list the various members within a class.

You can always use the open source Clang C++ parser (actually compiler) and read the AST into a C# Object Model. See CppSharp and ClangSharp for C# bindings to Clang.