Fix the hasType() AST matcher to not assert when the QualType is invalid.
authorAaron Ballman <aaron@aaronballman.com>
Fri, 2 Mar 2018 19:14:21 +0000 (19:14 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Fri, 2 Mar 2018 19:14:21 +0000 (19:14 +0000)
commit66a9268a2a11d445c13ac0f02464407fb01ada18
treee5d993cbc48538ef96213f530efd56cbbdf209b8
parent9010ee6376275129e6d40f74ed1b6afcf35dd0c6
Fix the hasType() AST matcher to not assert when the QualType is invalid.

There's not a particularly good way to test this with the AST matchers unit tests because the only way to get an invalid type (that I can devise) involves creating parse errors, which the test harness always treats as a failure. Instead, a clang-tidy test case will be added in a follow-up commit based on the original bug report.

llvm-svn: 326604
clang/include/clang/ASTMatchers/ASTMatchers.h