]> granicus.if.org Git - clang/commit
Adding 4 ASTMatchers: typedefDecl, isInMainFile, isInSystemFile, isInFileMatchingName
authorManuel Klimek <klimek@google.com>
Mon, 24 Nov 2014 09:10:56 +0000 (09:10 +0000)
committerManuel Klimek <klimek@google.com>
Mon, 24 Nov 2014 09:10:56 +0000 (09:10 +0000)
commitc07700ac2772f9f4dd66e25d5c03f94e8f331b58
tree90190c8705eb688849adbade58728117f98c14bb
parentfb768e1bdab31e04f255861b93bdf641b98cbaed
Adding 4 ASTMatchers: typedefDecl, isInMainFile, isInSystemFile, isInFileMatchingName

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@222646 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