frederic-tingaud-sonarsource wrote: Thanks for the feedback @mizvekov. I propose this change for the following reasons: - Class template implicit instantiations have technically no source range anywhere, which is why I think having the same behavior as function template implicit instantiations or variable template implicit instantiations is the best approach. - It is also the behavior of other implicit code like special member functions, that are located at the class definition and not at the latest declaration. - Class template implicit instantiations are definitions: calling `isThisDeclarationADefinition()` on them will return true, so one would expect their range to actually contain a definition. - Calling `getSourceLocation()` returns the definition already, so there is also a difference of behavior between `getSourceLocation()` and `getSourceRange()` that I find confusing.
https://github.com/llvm/llvm-project/pull/156011 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
