diff options
| author | Aotrix <[email protected]> | 2026-10-07 23:10:09 +0200 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2026-10-07 23:10:09 +0200 |
| commit | d72983996f30ee785cca9f66eeea598a2432744e (patch) | |
| tree | 6a7ef032549054a4ce9e5e9edc975796843a2f60 | |
| parent | 0d684f65b364baf8551acafccf7169a7af24ad93 (diff) | |
Add information regarding missing include directory
| -rw-r--r-- | CMakeLists.txt | 5 | ||||
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | compile_commands.json | 4 | ||||
| -rw-r--r-- | main.cc | 6 | ||||
| -rwxr-xr-x | remove.sh | 2 |
5 files changed, 15 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b1cd1d4..720f41d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,11 @@ add_clang_executable(remove-function-call removeFunctionCall.cpp ) +add_compile_options( + remove-function-call + /usr/lib/gcc/x86_64-pc-linux-gnu/16/include +) + clang_target_link_libraries(remove-function-call PRIVATE clangAST @@ -1 +1,7 @@ ./remove.sh file.cpp -parameter "NAME_OF_FUNCTION_PARAMETER" -value <true/false> + +IMPORTANT: +Do not forget to add this to compile_commands.json: +-I/usr/lib/gcc/x86_64-pc-linux-gnu/16/include + +And make sure that compile_commands.json is at the root of folder (not in `build`) diff --git a/compile_commands.json b/compile_commands.json index da7fc2f..ff109c6 100644 --- a/compile_commands.json +++ b/compile_commands.json @@ -1,8 +1,8 @@ [ { "directory": "/home/aotrix/development/clang_AST/removeFunctionCall/build", - "command": "/usr/bin/c++ -std=gnu++20 -fno-exceptions -funwind-tables -o CMakeFiles/remove-function-call.dir/removeFunctionCall.cpp.o -c /home/aotrix/development/clang_AST/removeFunctionCall/removeFunctionCall.cpp", + "command": "/usr/bin/c++ -std=gnu++20 -fno-exceptions -funwind-tables -o CMakeFiles/remove-function-call.dir/removeFunctionCall.cpp.o -c /home/aotrix/development/clang_AST/removeFunctionCall/removeFunctionCall.cpp -I/usr/lib/gcc/x86_64-pc-linux-gnu/16/include", "file": "/home/aotrix/development/clang_AST/removeFunctionCall/removeFunctionCall.cpp", "output": "CMakeFiles/remove-function-call.dir/removeFunctionCall.cpp.o" } -]
\ No newline at end of file +] @@ -18,14 +18,10 @@ bool coucouEveryone() int main() { std::string aValue{"stari"}; - if (configValue(aValue, "on")) { coucouEveryone(); } - if (!configValue("burger", "on")) - { - std::cout << "Mouhahahaha I am a villain!\n"; - } + int abc; return 0; } @@ -1,5 +1,5 @@ #!/usr/bin/env bash echo "Removing calls..." -./build/remove-function-call $1 $2 +./build/remove-function-call $1 clang-tidy $1 -checks=-*,readability-simplify-boolean-expr -fix >/dev/null 2>&1 echo "Done." |
