[PATCH] D5767: Template Instantiation Observer + a few other templight-related changes

Ábel Sinkovics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 6 08:12:18 PST 2018


sabel83 added a comment.

This pull requests consists of two parts:

a) a hook, which is called during template instantiation events

b) a callback, which dumps the details of the events out to standard output

Tools like Templight (https://github.com/mikael-s-persson/templight) rely on the hook. The callback is available to make it testable (see the tests, which are part of the pull request) and can be used as a simple way of querying some information about template instantiations if needed.

1. Testing on larger software: Templight is based on the hook and Metashell (http://metashell.org) is using Templight intensively. We have a branch of Metashell using the YAML output for template debugging (https://github.com/sabel83/metashell/tree/use_templight_dump).

2. What do you mean by regression tests? We have run the clang-test target successfully on the patched code (which has the hook). Note that the hook this pull request provides is implemented as a ProgramAction. It is not intended to be used together with other program actions, I don't see how we could turn it on for other tests (if that is what you referred to).


https://reviews.llvm.org/D5767





More information about the cfe-commits mailing list