Comment #1 on issue 1145 by honkstar1: Implicit cast through Ctor(T&&) removes include that is needed
https://github.com/include-what-you-use/include-what-you-use/issues/1145
When running with verbose 6 it outputs this in the working version (the one using "*")
Adding an implicit tpl-function type of interest: class SubClass
Adding a template-class type of interest: class BaseClass -> class BaseClass
When running with "&&", I get this output
Adding an implicit tpl-function type of interest: class SubClass *&
Ignoring unseen-in-fn-args template arg of interest: class SubClass *&
Adding a template-class type of interest: class BaseClass -> class BaseClass
I tried adding this to GetTplTypeResugarMapForFunctionNoCallExpr:
arg_type = RemovePointersAndReferencesAsWritten(arg_type);
That solved my problem. I will run IWYU on more of the code now and see if it too aggressively brings in includes or if this fix is a good one.