diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2017-02-07 03:34:08 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2017-02-07 03:34:08 +0000 |
| commit | 84f2470763143f1df1c5aaf8b49754f7129d85ce (patch) | |
| tree | 85d7803adef3555d3c3e8e05b4f1f48537fa03c3 /llvm/test/BugPoint/replace-funcs-with-null.ll | |
| parent | 8e6a25fecaad6888d915bfc0c68ddd6debb2a147 (diff) | |
| download | bcm5719-llvm-84f2470763143f1df1c5aaf8b49754f7129d85ce.tar.gz bcm5719-llvm-84f2470763143f1df1c5aaf8b49754f7129d85ce.zip | |
[PM] Defend against getting slightly wrong template arguments passed
into CRTP base classes.
This can sometimes happen and not cause an immediate failure when the
derived class is, itself, a template. You can end up essentially calling
methods on the wrong derived type but a type where many things will
appear to "work".
To fail fast and with a clear error message we can use a static_assert,
but we have to stash that static_assert inside a method body or nested
type that won't need to be completed while building the base class. I've
tried to pick a reasonably small number of places that seemed like they
would definitely get triggered on use.
This is the last of the patch series defending against this that I have
planned, so far no bugs other than the original were found.
llvm-svn: 294275
Diffstat (limited to 'llvm/test/BugPoint/replace-funcs-with-null.ll')
0 files changed, 0 insertions, 0 deletions

