Parse c++ and extract all used types and functions [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I want to write a program that runs before Visual Studio compiles my project.
It needs to extract only the types, names and parameters of all functions, classes, structs, enums my project is using from files in a specific folder (/sdk) and copy those into a new folder (/sdkmin)
So I basically want to have a program that minifies the sdk my project is using.
Is there any decent library that allows me to do that without having to write my own parser/lexer/whatever?

I think what you should do is look at some clang tools like "clang-format", "include-what-you-use", etc., which build on the clang AST front-end stuff to do various interesting things. This will provide the lexer and parser for you, which would indeed take a very long time if you started from scratch.
Github mirror here: https://github.com/llvm-mirror/clang

Related

How to identify executable lines in C++ code [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
How would one go about automatically identifying lines of C++ source files that contain (potentially) executable code? By potentially excecutable code, I mean code that might have been executable had its template been instantiated.
I expect it would be a purely syntactic determination. I'm not even completely sure this is even possible in all circumstances, but I guess it is.
Note that this is not the primary function of a dynamic coverage checker (although some may in fact perform this...)
(The goal is to enable a coverage checker to distinguish executable lines from comments, empty lines, type declarations, and the like.)
If you work with CLion IDE, you can use the pluging C/C++ Coverage.

GCC/G++ compiler settings GUI [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am looking for some frontend (GUI, Graphical user interface) for GCC and G++ which is oriented towards helping me setup the compiler in a user-friendly way.
I am not looking for a development environment, and the code edition is being made on a dedicated text editor (VS Code, Atom, whatever). I only want to compile my source and header files and change any compiler setting.
You can use Make to properly compile your files through a configuration (Makefile), but there is no GUI.
For more information : make documentation

tools for symbolic execution on binaries [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
are there any tools for symbolic execution on binaries. i mean using which, we do not require to modify the source code - like klee_make_symbolic
or we can do such changes in IR (llvm ir etc.)
thanks in advance
Maybe miasm can fit your requirements. It is a reverse engineer framework that supports static symbolic execution. As far as I know, it is more simple than KLEE and S2E.
Canonical list is in Awesome Symbolic Execution.
Symbolically executing binary code is much much harder, so i doubt there are such tools exist.
However note that you don't necessarily need to modify your code when using KLEE because it can model POSIX environment and C library (when compiled with support for this, of course). Using these features you can automatically symbolize argv arguments and keyboard interaction.

A tool to tell you what source files are needed in a C++ project? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am porting a large, messy, 10 year old cold base in C++ from Metrowerks on OS X to XCode. There are so many files and all the other people that touched this over the years are gone. Nobody know what files are actually needed and which are just cruft.
Is there any tool that I could run and have it produce a list of what files are ACTUALLY needed?
You could run doxygen on your project and have it generate inheritance diagrams for your classes. It can also generate caller graphs to help you find dead code.
You can try searching this static code analyzer list in Wikipedia. The ones that I've seen in actions would be cppdep and Include Hierarchy Viewer, although the first one is a little rough and the latter is a Windows analyzer only for the include tree. Also that still might not give you all the info if the dependencies are not explicit.
Edit: Also, the following StackOverflow search query seems to have results that might interest you:
https://stackoverflow.com/search?q=c%2B%2B+dependency

Is there an existing template for a new C++ Open Source project [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I want to start a new C++ (Qt) Open Source project and I'm wondering if there is an existing template somewhere for files usually found in an Open Source project but that are not purely source code (README, LICENSE, CHANGELOG, etc.)
I could probably find a popular Open Source project for inspiration but if there is some existing generic templates, I will use that instead.
Thanks.
One place to look might be the implementation of the GNU Hello program. It includes all the standard template files expected by the GNU coding guidelines.
You may, of course, choose to follow another set of guidelines than GNU's.
You might find the boost sandbox template interesting: Sandbox Template