]> granicus.if.org Git - clang/commit
[ASTMatchers] Don't assert-fail in specifiesTypeLoc().
authorDavid L. Jones <dlj@google.com>
Mon, 18 Jun 2018 08:59:16 +0000 (08:59 +0000)
committerDavid L. Jones <dlj@google.com>
Mon, 18 Jun 2018 08:59:16 +0000 (08:59 +0000)
commit8186139d6aa0619e2057ae617c074e486a7b2f2b
tree39aed8f20f4e3594ebb5b3f9ed65fb187c2c77f4
parentc36069cffc57a30a20782bf327a87bed4e48a6c2
[ASTMatchers] Don't assert-fail in specifiesTypeLoc().

The specifiesTypeLoc() matcher narrows a nestedNameSpecifier matcher based on a
typeloc within the NNS. However, the matcher does not guard against NNS which
are a namespace, and cause getTypeLoc to assert-fail.

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