weggli-rs / weggli

weggli is a fast and robust semantic search tool for C and C++ codebases. It is designed to help security researchers identify interesting functionality in large codebases.
Apache License 2.0
2.34k stars 130 forks source link

Add the ability to restrict matching to possible linear followups #10

Open jvoisin opened 3 years ago

jvoisin commented 3 years ago

It would be great to be able to tell weggli that all the predicates have to be following each other in a linear way.

For example:

if (a)
  A;
else
  B;
C
if (b)
  D;
else
  E;

Here, A can't follow B, but it can be followed by C and D or E.

This should make queries like free($a); free($a); more interesting.