fccf icon indicating copy to clipboard operation
fccf copied to clipboard

Ability to skip forward class declarations.

Open mibli opened this issue 3 years ago • 1 comments

Currently searching especially in large code bases can make the fccf process a lot of files.

Use case: User wants to search for a class Bunny in the code. Execution: fccf -C Bunny Expected behavior:

// ./Animals/Fun/Bunny.cpp (Line: 24 to 29)
struct Bunny {
  bool plushy;
  Color eyeColor;
  Color furColor;
}

Actual Behavior:

// ./Animals/Predators/Wolf.cpp (Line: 20 to 20)
class Bunny

// ./Farm/Fur/BunnyFarm.cpp (Line: 20 to 20)
class Bunny

... etc

It would be nice to have -C skip forward declarations, or have an option to skip them. If there's such an option I haven't found it. Not only it would help get user what he wants, but it would reduce search times significantly. On a large code base (~3mln LoC) that optimizes with forward class declarations, looking up a class can take up to 10 minutes. If these wouldn't be matched, it would take up to few seconds.

mibli avatar May 12 '22 13:05 mibli

The point is it to be different than --isl, because --isl still has to precompile the code as far as I understand.

mibli avatar May 12 '22 13:05 mibli