-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
i want using clang-query to do Static Code Analysis. but i find some different and funny things. The test results are different when installing clang-query-10 using apt and pip method in the project. The only difference is the path used for clang-query.
- using pip install
It will install the clang-tools into /usr/local/bin/
pip3 install clang-tools
clang-tools --install 10 --tool clang-query --directory /usr/local/bin/
test result in match :
root@dc9a644c9793: /usr/local/bin/clang-query-10 TDengine/debug/compile_commands.json TDengine/community/source/dnode/vnode/src/tsdb/tsdbRead2.c -f TDengine/community/tests/ci/filter_for_return_values
0 matches.
- apt install
It will install the clang-tools into /usr/bin/
apt install clang-tools-10
root@dc9a644c9793:/home/chr/clang_scan_result/20240812154233# /usr/bin/clang-query-10 -p TDengine/debug/compile_commands.json TDengine/community/source/dnode/vnode/src/tsdb/tsdbRead2.c -f TDengine/community/tests/ci/filter_for_return_values
In file included from TDengine/community/source/dnode/vnode/src/tsdb/tsdbRead2.c:17:
In file included from TDengine/community/source/dnode/vnode/src/inc/tsdb.h:22:
In file included from TDengine/community/include/util/tsimplehash.h:19:
In file included from TDengine/community/include/util/tarray.h:19:
Match #1:
TDengine/community/source/dnode/vnode/src/tsdb/tsdbRead2.c:5831:7: note: "root" binds here
tsdbUnrefMemTable(pTsdb->mem, pSnap->pNode, true); // unref the previous refed mem
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Match #2:
TDengine/community/source/dnode/vnode/src/tsdb/tsdbRead2.c:5848:7: note: "root" binds here
tsdbUnrefMemTable(pTsdb->mem, pSnap->pNode, true); // unref the previous refed mem
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Match #3:
TDengine/source/dnode/vnode/src/tsdb/tsdbRead2.c:5852:7: note: "root" binds here
tsdbUnrefMemTable(pTsdb->imem, pSnap->pINode, true);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 matches.
Metadata
Metadata
Assignees
Labels
No labels