The patch adds support for further implementation of P1131R2: Core Issue 2292 and fixes PR43966.
Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=43966
The core issue is that simple-template-id is ambiguous between class-name and type-name.
Previous Commit Review:
https://reviews.llvm.org/rGee0f1f1edc3ec0d4e698d50cc3180217448802b7
The patch got reverted due to buildbot failure in LLVM and new error in chromium code.
You can then drop the RD test here (which wasn't useful anyway given that we dereference RD before checking if it's null). I'm not certain what this was trying to test though -- it looks like we want (RD->hasDefinition() && RD->hasSimpleDestructor()) || !RD->hasDefinition()?