You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
all: a b c
a: a.cpp
g++ -c a.cpp
b: b.cpp
g++ -c b.cpp
c: c.cpp
g++ -c c.cpp
Let's suppose that I setup the CodeChecker VSCode plugin and I want to modify my header file (f.h). In this case I have to re-analyze all the source files which depend on this header file (a.cpp and b.cpp but not c.cpp).
For now if I modify a header file it will call the analysis and set the --file option to this header file which will not do what we want.
To figure out these source files which need to be reanalyzed we can use the tu_collector tool from CodeChecker: tu_collector -l ~/myproject/.codechecker/compile_commands.json -d --filter ~/myproject/f.h
The result will be the list of source files:
~/myproject/a.cpp
~/myproject/b.cpp
The text was updated successfully, but these errors were encountered:
Maybe it would be better to solve this problem inside CodeCheker rather than in the plugin. So if someone provides a header file to the analyze command (CodeChecker analyze --file x.h ... ) we will use the tu_collector under the hood the figure out which source files are depends on the given header file and we will analyze these source files.
Let's suppose that I have the following header and source files:
f.h:
a.cpp:
b.cpp:
c.cpp:
I also have the following simple Makefile:
Let's suppose that I setup the CodeChecker VSCode plugin and I want to modify my header file (
f.h
). In this case I have to re-analyze all the source files which depend on this header file (a.cpp
andb.cpp
but notc.cpp
).To figure out these source files which need to be reanalyzed we can use the
tu_collector
tool from CodeChecker:tu_collector -l ~/myproject/.codechecker/compile_commands.json -d --filter ~/myproject/f.h
The result will be the list of source files:
The text was updated successfully, but these errors were encountered: