This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Set range end of constructors and destructors in template instantiations
ClosedPublic

Authored by malcolm.parsons on Nov 18 2016, 5:06 AM.

Details

Summary

clang-tidy checks frequently use source ranges of functions.
The source range of constructors and destructors in template instantiations
is currently a single token.
The factory method for constructors and destructors does not allow the
end source location to be specified.
Set end location manually after creating instantiation.

Diff Detail

Repository
rL LLVM

Event Timeline

malcolm.parsons retitled this revision from to [Sema] Set range end of constructors and destructors in template instantiations.
malcolm.parsons updated this object.
malcolm.parsons added a subscriber: cfe-commits.

Is it possible to add a test for this change? Maybe you could dump the AST and check if the range is the one that you would expect (See test/Misc/ast-dump-decl.cpp for an example).

arphaman accepted this revision.Nov 28 2016, 2:46 AM
arphaman edited edge metadata.

I think it LG, thanks for adding the test

This revision is now accepted and ready to land.Nov 28 2016, 2:46 AM
This revision was automatically updated to reflect the committed changes.