Fix crash in template type diffing.
authorRichard Trieu <rtrieu@google.com>
Fri, 5 Aug 2016 03:16:36 +0000 (03:16 +0000)
committerRichard Trieu <rtrieu@google.com>
Fri, 5 Aug 2016 03:16:36 +0000 (03:16 +0000)
commite1a6a7d6d3676db194928d0025a40fe9ea3842de
treea8110a835fded1ddd29cca2b831901ad6541d5b4
parent7561ed01cb762d336d60dc2b05faab6c948e11fd
Fix crash in template type diffing.

When the type being diffed is a type alias, and the orginal type is not a
templated type, then there will be no unsugared TemplateSpecializationType.
When this happens, exit early from the constructor.  Also add assertions to
the other iterator accessor to prevent the iterator from being used.

llvm-svn: 277797
clang/lib/AST/ASTDiagnostic.cpp
clang/test/Misc/diag-template-diffing.cpp