Commit Graph

3 Commits

Author SHA1 Message Date
J.Ru 27da44e009 Introduce an extra use flag UF_ExplicitInstantiation
To signal that the use refers to an explicit instantiation, for which the
"canonical" decl is not suitable.

Also, since it is meant to be used in a specific context, the ReportDeclUse
prototype has been adapted to take optional extra flags as an additional
input.
2018-12-07 09:12:01 +01:00
Kim Grasman 2406addcc7 Count free function definitions as uses
Now that we can provide context for uses with use flags, we can tweak
IWYU behavior when a function is being defined.

This allows us to treat a function definition as a use of all
previously-seen declarations.

Fixes #179, #491 and #441.
2018-03-09 20:37:52 +01:00
Kim Grasman aa2bc1f9e0 Replace in_cxx_method_body with an extensible use-flag
This makes it possible to pass more context information about a use
from the detection phase to later IWYU analysis phases.
2018-03-09 20:37:52 +01:00