| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Contributes to #6469.
To handle global variables:
* Add EntityKindGlobalVariable
* Modify TraverseVarDecl() function logic
* Add a check to ensure StartLine and EndLine are in the same file
* Fix missing #include <cstdint> in json.h
|
| |
|
|
|
|
|
|
|
|
| |
- Extract struct field offsets and sizes in the C++ codesearch indexer.
- Add 'fields' to the JSON definition output.
- Update pkg/codesearch to parse and expose the new field information.
- Add 'struct-layout' command to syz-codesearch for debugging.
- Add 'codesearch-struct-layout' tool to pkg/aflow/tool/codesearcher/
to allow LLM agents to query struct memory layout and map byte offsets to fields.
- Support pointer marshaling for optional JSON values (e.g. *uint)
|
| | |
|
| |
|
|
|
| |
Use uint32 instead of int for line numbers (2G lines should be enough for everyone).
Reorder fields to remove unnecessary paddings.
|
| |
|
|
|
| |
Use uint8 enums instead of strings to store entity/reference kind.
String is 16 bytes and is slower to work with.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With all references in the index, it become quite big.
Merge and dedup the resulting index on the fly.
Also intern all strings b/c there are tons of duplicates.
This also removes unnecessary duplicates (effectively ODR violations in the kernel)
due to use of BUILD_BUG_ON. The macro produces different function calls
in different translations units, so the same function may contain
__compiletime_assert_N1 call in one TU and __compiletime_assert_N2 in another.
Over this reduces resource consumption of index building from:
time:296.11s user:16993.71s sys:6661.03s memory:82707MB
to:
time:194.28s user:16860.01s sys:6647.01s memory: 3243MB
25x reduction in memory consumption.
|
| |
|
|
| |
Update #6469
|
| |
|
|
| |
Update #6469
|
| |
|
|
|
|
| |
If format of the codesearch DB file changes,
we need to create new DB rather than use old cached one.
Add DB format hash to cache signature.
|
| |
|
|
|
|
|
|
|
| |
Extend codesearch clang tool to export info about function references
(calls, takes-address-of).
Add pkg/codesearch command find-references.
Export find-references in pkg/aflow/tools/codesearcher to LLMs.
Update #6469
|
|
|
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.
|