On Tuesday, July 1, 2025 at 11:29:42 pm +01:00, Joern Wolfgang Rennecke 
<[email protected]> wrote:

> P.S.: to get get the specifity of linenumbers without the brittleness, we 
> could have a pragma for the extra dump line tag instead. Either till the next 
> such pragme / EOF, or (if before next such pragma), till the end of function.
> Disadvantages: Not actually more specific when the source describes a 
> template, or gets cloned. Unless we add the mangled filename too, either 
> unconditionally, per option, or per format (complex, bugprone).
> The tag would have to be associated with or included in the source location. 
> That might get complex and be a source of bugs in itself.
> P.P.S.: Instead of having a new location mechanism, we could leverage the 
> existing facility to have preprocessor
directives tell the original source file.
A test file with lots of small functions, or a big function with independent 
parts that can be tracked by source location,
can use these directives to pretend it is the result of preprocessing lots of 
#include directives for smaller files.

We would still need a dump option to tag the output with the filename. If this 
takes the form of prepending each line with the filename, we can use standard 
scan regexps to check the for presence or absence of pattern for a specific 
part (rather than the current mess of expecting a total count).

Reply via email to