]> granicus.if.org Git - clang/commit
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)
commitc08ce0cfcf5ab93405ad9d1c5e185b55a672bccb
tree362a84733e83c933e61f9afbf33d302ec4121683
parentda93a32462be38619a8e0f759c36521ca009b82b
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326604 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/ASTMatchers/ASTMatchers.h