]> granicus.if.org Git - clang/commit
Re-apply r222646 (was reverted in r222667). Adding 4 ASTMatchers: typedefDecl, isInMa...
authorManuel Klimek <klimek@google.com>
Tue, 25 Nov 2014 17:01:06 +0000 (17:01 +0000)
committerManuel Klimek <klimek@google.com>
Tue, 25 Nov 2014 17:01:06 +0000 (17:01 +0000)
commitb3cf7e2fbf12bee1693cf158df14663b83776019
treefd771080e7e0969fd35a164f3a9eee63b6085f8d
parent6e0cba8d5500c7da4a91e55d576cb41ab1bd5bc5
Re-apply r222646 (was reverted in r222667). Adding 4 ASTMatchers: typedefDecl, isInMainFile, isInSystemFile, isInFileMatchingName

Change to original: ifndef out tests in Windows due to /-separated
paths.

Summary:
Often one is only interested in matches within the main-file or matches
that are not within a system-header, for which this patch adds
isInMainFile and isInSystemFile. They take no arguments and narrow down
the matches.

The isInFileMatchingName is mainly thought for interactive
clang-query-sessions, to make a matcher more specific without restarting
the session with the files you are interested in for that moment. It
takes a string that will be used as regular-expression to match the
filename of where the matched node is expanded.

Patch by Hendrik von Prince.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222765 91177308-0d34-0410-b5e6-96231b3b80d8
docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h
include/clang/Tooling/Tooling.h
lib/ASTMatchers/Dynamic/Registry.cpp
lib/Tooling/Tooling.cpp
unittests/ASTMatchers/ASTMatchersTest.cpp
unittests/ASTMatchers/ASTMatchersTest.h