| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, clang tools are built by copying their code into a
llvm-project repository and adding build rule to LLVM's CMake. This
allows pinning a specific LLVM hash which is convenient but it's also a
bit painful to copy code across repositories.
This adds a rule to make that can build syz-codesearch with a simple g++
invocation that uses llvm-config to get the LLVM compiler and linker
flags and hardcodes some clang libraries to link against since I could
not find a better way. (llvm-config does not have "components" for
clang)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When compiling with the changes-meaning flag, syz-codesearch gets a
bunch of errors such as this one:
codesearch.cpp:30:15: error: declaration of ‘clang::SourceRange MacroDef::SourceRange’
changes meaning of ‘SourceRange’ [-Wchanges-meaning]
30 | SourceRange SourceRange; // soruce range of the value
| ^~~~~~~~~~~
codesearch.cpp:30:3: note: used here to mean ‘class clang::SourceRange’
30 | SourceRange SourceRange; // soruce range of the value
| ^~~~~~~~~~~
Let's iron them out early before the code base grows too reliant on
this pattern.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a clang tool that is used for code indexing (tools/clang/codesearch/).
It follows conventions and build procedure of the declextract tool.
Add pkg/codesearch package that aggregates the info exposed by the clang tools,
and allows doing simple queries:
- show source code of an entity (function, struct, etc)
- show entity comment
- show all entities defined in a source file
Add tools/syz-codesearch wrapper tool that allows to create index for a kernel build,
and then run code queries on it.
|
|
|
Some of the common helpers may be reused across different Clang tools
(currently json.h and .clang-format). Move the files to allow such reuse.
|