You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are many issues, regarding main file sorting.
Also, we have the issue, that a main source file can have 2 main headers, e.g. a.cppa.h and a_priv.h
With IncludeIsMainRegex and IncludeIsMainSourceRegex only a mapping between a header to a source can be defined, but not the other way round.
A solution to all issues would be, to add a parameter in the form of a named capture group to the regex.
For example, a hypothetical group definition (?<main>regex) would map to \k<main>, which then maps to the main file's stem.
There are many issues, regarding main file sorting.
Also, we have the issue, that a main source file can have 2 main headers, e.g.
a.cpp
a.h
anda_priv.h
With
IncludeIsMainRegex
andIncludeIsMainSourceRegex
only a mapping between a header to a source can be defined, but not the other way round.A solution to all issues would be, to add a parameter in the form of a named capture group to the regex.
For example, a hypothetical group definition
(?<main>regex)
would map to\k<main>
, which then maps to the main file's stem.The above would then match
a_priv.h
as expected.With that, programmers could also override the default behavior, to accomplish:
#58284
#37620 #39735 #53013
Possible implementation could be:
IncludeIsMainRegex
andIncludeIsMainSourceRegex
The text was updated successfully, but these errors were encountered: