History log of /external/clang/include/clang/ASTMatchers/ASTMatchers.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef8225444452a1486bd721f3285301fe84643b00 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
6c1dc7870f457803a9b256ed868da82532be820b 18-Nov-2013 Samuel Benzaquen <sbenza@google.com> Add partial support for the hasDeclaration() matcher in the dynamic layer.

Summary:
Add partial support for the hasDeclaration() matcher in the dynamic layer.
This matcher has some special logic to allow any type that has a getDecl() method. We do not support this right now.

Reviewers: klimek

CC: cfe-commits, revane

Differential Revision: http://llvm-reviews.chandlerc.com/D1889

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
3f0e0402d8cd40b428f975f1a3607dbbd94d2ca6 06-Nov-2013 Peter Collingbourne <peter@pcc.me.uk> Introduce BoundNodes::getMap.

The purpose of this function is to allow clients of the dynamic AST matcher
to enumerate each binding.

Differential Revision: http://llvm-reviews.chandlerc.com/D2095

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
063820655db8121f0022a7c51458463c7250324c 20-Oct-2013 Benjamin Kramer <benny.kra@googlemail.com> Miscellaneous speling fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
e575359c34a9248c55ec0c03a8fc945f1ee4cb01 09-Sep-2013 Benjamin Kramer <benny.kra@googlemail.com> Fix constructor-related typos.

Noticed by Roman Divacky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
1245a54ca6e9c5b14196461dc3f84b24ea6594b1 07-Sep-2013 Enea Zaffanella <zaffanella@cs.unipr.it> Fix missing source location in CXXTemporaryObjectExpr nodes.
For clarity, renamed (get/set)ParenRange as (get/set)ParenOrBraceRange
in CXXConstructExpr nodes.
Added testcase.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
9e046e1575fb957a8acb76666c67ed509e7ffe96 04-Sep-2013 Eric Christopher <echristo@gmail.com> More unused warning silencing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
799bf2d371bb1cba04317c216ce1cd707d389c74 04-Sep-2013 Eric Christopher <echristo@gmail.com> Attempt to silence some defined but not used warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
d36e46350b50907425bba0db1b3ddfb46cc1637f 27-Aug-2013 Samuel Benzaquen <sbenza@google.com> Rewrite eachOf/allOf/anyOf to use a variadic operator.

Summary:
Rewrite eachOf/allOf/anyOf to use a variadic operator, instead of hand-written calls to Polymorphic matchers.
This simplifies their definition and future changes to add them to the dynamic registry.

Reviewers: klimek

CC: cfe-commits, revane

Differential Revision: http://llvm-reviews.chandlerc.com/D1427

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
ee0da9520fe94f701240e9e1c97773ee412be102 16-Aug-2013 Samuel Benzaquen <sbenza@google.com> Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration.

Summary:
Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration.
This facilitates dynamic registration. Change the registry code to use the regular overload resolution mechanism for adaptative matchers.

Reviewers: klimek

CC: cfe-commits, revane

Differential Revision: http://llvm-reviews.chandlerc.com/D1402

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
c5ae717c2b774bfce6bce4bb51072f664b2d54aa 26-Jul-2013 Daniel Jasper <djasper@google.com> Add matcher for float literals.

Patch by Chris Gray! Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
6de440e1989ee7932c942dcba85e862c31bf4604 24-Jul-2013 Samuel Benzaquen <sbenza@google.com> Add support for Adaptative matchers on the dynamic registry.

Summary:
Add support for Adaptative matchers on the dynamic registry.
Each adaptative matcher is created with a function template. We instantiate the function N times, one for each possible From type and apply the techniques used on argument overloaded and polymorphic matchers to add them to the registry.

Reviewers: klimek

CC: cfe-commits, revane

Differential Revision: http://llvm-reviews.chandlerc.com/D1201

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
0e1896a753845deee5206b28cdbde1640abb9cac 22-Jul-2013 Samuel Benzaquen <sbenza@google.com> Add support for overloaded matchers. ie different matcher function signatures with the same name.

Summary:
Add support for overloaded matchers.
This composes with other features, like supporting polymorphic matchers.

Reviewers: klimek

CC: cfe-commits, revane

Differential Revision: http://llvm-reviews.chandlerc.com/D1188

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
de9ed71c696bee936a21323f61548164de0eda13 19-Jul-2013 Enea Zaffanella <zaffanella@cs.unipr.it> Fix source range of implicitly instantiated friend declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
06963013d1972f1f7a58875bb40976b60522700b 19-Jul-2013 Manuel Klimek <klimek@google.com> Adds ctorInitializer and forEachConstructorInitializer matchers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
d4de59d3e54421ef88316d650e35802ba9c572cf 17-Jul-2013 Enea Zaffanella <zaffanella@cs.unipr.it> Fixed source range of C++03 access declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
3f84bb341bfb1312842b09db71d76bc3898ba247 15-Jul-2013 Samuel Benzaquen <sbenza@google.com> Add support for type traversal matchers.

Summary:
Fixup the type traversal macros/matchers to specify the supported types.
Make the marshallers a little more generic to support any variadic function.
Update the doc script.

Reviewers: klimek

CC: cfe-commits, revane

Differential Revision: http://llvm-reviews.chandlerc.com/D1023

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
bd9cbd22b832ce65a085801259cf2d3df77830e4 07-Jul-2013 Enea Zaffanella <zaffanella@cs.unipr.it> Fixed source range for functional cast and unresolved construct expr nodes.
Added testcases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
2d77634e839880704d51656bebd1d2daff661d4e 06-Jul-2013 Enea Zaffanella <zaffanella@cs.unipr.it> Fixed source location info for UnaryTransformTypeLoc nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
ef7eb024397a6a9d1455b31bc7b10288a817ac3b 21-Jun-2013 Samuel Benzaquen <sbenza@google.com> Add support for polymorphic matchers. Use runtime type checking to determine the right polymorphic overload to use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
cf52ca6bb6dd76a1bd967bc422287fafafa1e45a 20-Jun-2013 Manuel Klimek <klimek@google.com> Adds the equalsBoundNode matcher.

Most of the tests contributed by Edwin Vane.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
1a68afd5bbecd05a3bb22854954aa4e5448c4470 20-Jun-2013 Manuel Klimek <klimek@google.com> Implements declaratorDecl, parmVarDecl and hassTypeLoc matchers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
054d049174eb1ec8e93a4a0831c0d8caac00cb3a 19-Jun-2013 Manuel Klimek <klimek@google.com> Completely revamp node binding for AST matchers.

This is in preparation for the backwards references to bound
nodes, which will expose a lot more about how matches occur. Main
changes:
- instead of building the tree of bound nodes, we build a "set" of bound
nodes and explode all possible match combinations while running
through the matchers; this will allow us to also implement matchers
that filter down the current set of matches, like "equalsBoundNode"
- take the set of bound nodes at the start of the match into
consideration when doing memoization; as part of that, reevaluated
that memoization gives us benefits that are large enough (it still
does - the effect on common match patterns is up to an order of
magnitude)
- reset the bound nodes when a node does not match, thus never leaking
information from partial sub-matcher matches for failing matchers

Effects:
- we can now correctly "explode" combinatorial matches, for example:
allOf(forEachDescendant(...bind("a")),
forEachDescendant(...bind("b"))) will now trigger matches for all
combinations of matching "a" and "b"s.
- we now never expose bound nodes from partial matches in matchers that
did not match in the end - this fixes a long-standing issue

FIXMEs:
- rename BoundNodesTreeBuilder to BoundNodesBuilder or
BoundNodesSetBuilder, as we don't build a tree any more; this is out
of scope for this change, though
- we're seeing some performance regressions (around 10%), but I expect
some performance tuning will get that back, and it's easily worth
the increase in expressiveness for now

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
03a83238c39e290ed6e2ced7663efa9fa8c19158 10-Jun-2013 Manuel Klimek <klimek@google.com> Fixes the comment for hasDeclaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
acf02715ab1aa1e5a791f20e0d1ca217af256823 10-May-2013 Peter Collingbourne <peter@pcc.me.uk> Add caseStmt(), defaultStmt(), eachCase() and hasCaseConstant() matchers.

Differential Revision: http://llvm-reviews.chandlerc.com/D744

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
32a6ebc63900b85780328c337787bb7adad2bcab 09-May-2013 Edwin Vane <edwin.vane@intel.com> Adding isConst() ASTMatcher for CXXMethodDecl nodes

Updated reference and unit tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
54eeac9cb538e4fc4eecd81f2eda8f6fa727ca76 07-May-2013 Edwin Vane <edwin.vane@intel.com> Prevent crashes from hasCanonicalType matcher

Adding an QualType::isNull() check.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
5771a2f0830228ac50e3473740e24d9dca67b54f 09-Apr-2013 Edwin Vane <edwin.vane@intel.com> Adding new AST Matchers isVirtual and isOverride

isVirtual - matches CXXMethodDecl nodes for virtual methods
isOverride - matches CXXMethodDecl nodes for methods that override virtual methods from a base class.

Author: Philip Dunstan <phil@philipdunstan.com>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
abe922342d67d4ffe05b366a5a2af972185272f8 08-Apr-2013 Daniel Jasper <djasper@google.com> Add matcher for NamespaceDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
7b69cd09440976d6b93a0db661a770b2337be8d2 02-Apr-2013 Edwin Vane <edwin.vane@intel.com> Adding a hasLocalQualifiers() AST Matcher.

Updated tests and docs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
88be2fdec7a1375bc729a6499629532e7872f11a 01-Apr-2013 Edwin Vane <edwin.vane@intel.com> Adding parenType() and innerType() AST Matchers

Updated docs and tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
f4b48042724d2253d0426cadcb93e24eeb47e264 07-Mar-2013 Edwin Vane <edwin.vane@intel.com> Adding lvalue and rvalue reference type matchers

Updated docs and tests.

Reviewers: klimek, gribozavr


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
6a19a97e57c8678adb0505a07c97d7ccadc8fe4e 06-Mar-2013 Edwin Vane <edwin.vane@intel.com> New ASTMatchers and enhancement to hasOverloadedOperatorName

Added two new narrowing matchers:
* hasMethod: aplies a matcher to a CXXRecordDecl's methods until a match is made
or there are no more methods.
* hasCanonicalType: applies a matcher to a QualType's canonicalType.

Enhanced hasOverloadedOperatorName to work on CXXMethodDecl as well as
CXXOperatorCallExpr.

Updated tests and docs.

Reviewers: klimek, gribozavr


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
aec89ac22e1876bb1cfff9062c882a622bc84510 04-Mar-2013 Edwin Vane <edwin.vane@intel.com> hasQualifer() matcher should return false if there's no qualifier

Instead of passing NULL on to sub-matcher, just return false. Updated tests and
regenerated docs.

Author: Tareq A Siraj <tareq.a.siraj@intel.com>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
742d9e77e32f014194679575c97c6bb4fd0998c4 25-Feb-2013 Edwin Vane <edwin.vane@intel.com> Various additions to ASTMatcher library:

New type matchers:
* recordType
* elaboratedType

New narrowing matchers:
* hasQualifier
* namesType
* hasDeclContext

Added tests and updated LibASTMatchersReference.

Reviewers: klimek


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
3abf77872ca6c520903f9174cf6cd89a50df2714 25-Feb-2013 Edwin Vane <edwin.vane@intel.com> Adding hasDeclaration overload for TemplateSpecializationType

TemplateSpecializationType doesn't quite have getDecl(). Need to go
through TemplateName to get a TemplateDecl.

Added test cases for the hasDeclaration() overload for
TemplateSpecializationType. Also introduced the type matcher
templateSpecializationType() used by the new hasDeclaration() test case.

Updated LibASTMatchersReference.

Reviewers: klimek


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
f3197e9eb02120522c1f60f88dacc1cfe5b210f0 25-Feb-2013 Daniel Jasper <djasper@google.com> Add matcher for AccessSpecDecls.

Also, add matchers isPrivate(), isProtected() and isPublic(), that
restrict the matching of such AccessSpecDecls and all other Decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
523806028d812a7f29636c59a8bc0e7e3d3fd9ae 19-Feb-2013 Edwin Vane <edwin.vane@intel.com> Support in hasDeclaration for types with getDecl()

Using a new metafunction for detecting the presence of the member
'getDecl' in a type T, added support to hasDeclaration for any such type
T. This allows hasDecl() to be replaced and enables several other
subclasses of clang::Type to use hasDeclaration.

Updated unittests and LibASTMatchersReference.html.

Reviewers: klimek


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
7f43fcf5d9406788ce95c9f3b785e0a6bc75a7f7 12-Feb-2013 Edwin Vane <edwin.vane@intel.com> Adding more overloads for allOf matcher

Adding overloads of allOf accepting 4 and 5 arguments.

Reviewer: klimek



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
06b247f0ffb69854e32150c80f347a9376d3709b 11-Feb-2013 Manuel Klimek <klimek@google.com> Do not use VariadicDynCastAllOfMatcher where VariadicAllOfMatcher works.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
fa37c5ca61af275a329386407e58cf70f4d9f596 07-Feb-2013 Manuel Klimek <klimek@google.com> Implements equalsNode for Decl and Stmt.

This is a powerful tool when doing iterative refined matches,
where another match is started inside the match callback of the first
one; this allows for example to find out whether the node was in
the condition or body of its parent if-statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
415514d5fbc2761b7f2938aa9112b079249820d6 06-Feb-2013 Manuel Klimek <klimek@google.com> Cleanup of ASTMatcher macros and adding support for overloaded matchers.

This is in preparation for adding other overloaded matchers. This change
alone is a net win in LOC.
I went through all matchers and looked whether we could now encode them
as macro, or simplify them with the matcher atoms that were not
available before.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174540 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
afbcab8d10d4208c7ad8da79e948432117d4a326 05-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR15095: Use more correct source locations for the InitListExpr we fake up for
vector initialization. Patch by John Stratton!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
152ea0e4711f7aed75f6a1d1995b0bd94eb31c98 04-Feb-2013 Manuel Klimek <klimek@google.com> Implements the convenience matcher findAll.

We found that findAll has been implemented incorrectly multiple times
by various people using the matchers. To prevent further wasted
development effort, it makes sense to add it as convenience matcher
implemented as eachOf(m, forEachDescendant(m)).

This patch also updates the docs with the new matchers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
7387673f83b8b37f660422947c9990778ba88193 04-Feb-2013 Manuel Klimek <klimek@google.com> Add an eachOf matcher.

eachOf gives closure on the forEach and forEachDescendant matchers.
Before, it was impossible to implement a findAll matcher, as matching
the node or any of its descendants was not expressible (since anyOf
only triggers the first match).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
f8c12146fa2153a6d97b7c92d27d2ece0cd26e79 03-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove unneeded const_casts


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
31bdf071afc18bb9551e4f4254be297333200c4a 10-Dec-2012 Manuel Klimek <klimek@google.com> Clarifying comments for the MatchFinder and matchesNames matcher.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
36e29d6732814e958aea4b2f403cec63d7ed3116 04-Dec-2012 Daniel Jasper <djasper@google.com> Add parameterCountIs() matcher.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
a267cf6f87dc695143d65fc61ec1744564f55932 29-Oct-2012 Daniel Jasper <djasper@google.com> Implement has(), hasDescendant(), forEach() and forEachDescendant() for
Types, QualTypes and TypeLocs.

Review: http://llvm-reviews.chandlerc.com/D83

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
c711af2ddbbb1d46223cc9379d32a203fb5bc7f4 23-Oct-2012 Daniel Jasper <djasper@google.com> Make hasDeclaration() matcher work inside the memberExpr() matcher.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
70b9db9879c1cb8b8ca7d6c9809e35361cab83dc 23-Oct-2012 Manuel Klimek <klimek@google.com> Implements the thisExpr matcher.
Patch by Gabor Horvath.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
c99a3ad8c2bf29da45a0c64b88d58bfbd2f78ef2 22-Oct-2012 Daniel Jasper <djasper@google.com> Implement hasParent()-matcher.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
a1a4c0385a0fd458243d9e357e1eceb137f29abf 19-Oct-2012 Nick Lewycky <nicholas@mxc.ca> Fix typo in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
ce62007526cdf718faed10df5e9fc7c3cd160cde 17-Oct-2012 Daniel Jasper <djasper@google.com> First version of matchers for Types and TypeLocs.

Review: http://llvm-reviews.chandlerc.com/D47

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
31f7c08a0d2b140bf31a08894d1948649de53c15 01-Oct-2012 Daniel Jasper <djasper@google.com> Add matchers for selected C++11 features.

Patch by Gábor Horváth.
Review: http://llvm-reviews.chandlerc.com/D46

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
aaa8e45b8e392a1f1b7498e2f00c6ed66d41119a 29-Sep-2012 Daniel Jasper <djasper@google.com> Fix refersToDeclaration()-matcher and add missing test case. This was
broken as of r164656 as TemplateArgument::getAsDecl() now asserts
instead of returning NULL for other template arugment kinds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
9158a5624154bc43bbbf059c07a2f7b2cd45c1a1 25-Sep-2012 Alexander Kornienko <alexfh@google.com> A minor doc fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
b54b7646b2d00a85d80e40adf7c49553f150c736 20-Sep-2012 Daniel Jasper <djasper@google.com> Add some matchers for basic AST nodes.

Patch by Gábor Horváth.
Review: http://llvm-reviews.chandlerc.com/D45

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
e6d2a96cc9689be584c3bfc09ac527a03a25b3bc 18-Sep-2012 Daniel Jasper <djasper@google.com> Add missing matcher for C-style cast expressions.

Patch by Gábor Horváth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
3680b4f7494b6744b9c5a25f83b63cd8b7e434fc 18-Sep-2012 Daniel Jasper <djasper@google.com> Make all VariadicDynCast-Expr-matchers StatementMatchers

Having Expr-subclass-matchers being VariadicDynCast-Expr-matchers does
not provide additional type safety and just makes using them harder. In
the clang AST, expressions are always statements and an expression
matcher can be used anywhere, a statement matcher is expected. Any given
matcher definition still has at least one noun.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164121 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
a7564433191601cb8851196b8dde39392c9c05ee 13-Sep-2012 Daniel Jasper <djasper@google.com> Create initial support for matching and binding NestedNameSpecifier(Loc)s.

Review: http://llvm-reviews.chandlerc.com/D39

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
63d88728d862f8a69b3291e533d193d1d8513f5a 12-Sep-2012 Daniel Jasper <djasper@google.com> Rename isA to isSameOrDerivedFrom.

There are two evils we can choose from:
- Name overlap between isA-matcher and llvm::isa<>()
- Bad name for what the isA-matcher currently does

After some discussion we have agreed to go with the latter evil.

Review: http://llvm-reviews.chandlerc.com/D40

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163740 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
76dafa7e6487c0b51fadebd16bdefe0e0e23d595 07-Sep-2012 Daniel Jasper <djasper@google.com> Change the behavior of the isDerivedFrom-matcher to not match on the
class itself. This caused some confusion (intuitively, a class is not
derived from itself) and makes it hard to write certain matchers, e.g.
"match and bind any pair of base and subclass".

The original behavior can be achieved with a new isA-matcher. Similar
to all other matchers, this matcher has the same behavior and name as
the corresponding AST-entity - in this case the isa<>() function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
579b120038ca817e0ce423303ebc1b4e0c6cbbe1 07-Sep-2012 Manuel Klimek <klimek@google.com> Implements hasAncestor.

Implements the hasAncestor matcher. This builds
on the previous patch that introduced DynTypedNode to build up
a parent map for an additional degree of freedom in the AST traversal.

The map is only built once we hit an hasAncestor matcher, in order
to not slow down matching for cases where this is not needed.

We could implement some speed-ups for special cases, like building up
the parent map as we go and only building up the full map if we break
out of the already visited part of the tree, but that is probably
not going to be worth it, and would make the code significantly more
complex.

Major TODOs are:
- implement hasParent
- implement type traversal
- implement memoization in hasAncestor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
a78d0d6203a990b88c9c3e4c4f2a277001e8bd46 05-Sep-2012 Manuel Klimek <klimek@google.com> Introduces DynTypedMatcher as a new concept that replaces the UntypedBaseMatcher and TypedMatcher.

Due to DynTypedNode the basic dynamically typed matcher interface can now be simplified.

Also switches the traversal interfaces to use DynTypedNode;
this is in preperation for the hasAncestor implementation, and
also allows us to need fewer changes when we want to add new
nodes to traverse, thus making the code a little more decoupled.

Main design concerns: I went back towards the original design
of getNodeAs to return a pointer, and switched DynTypedNode::get
to always return a pointer (in case of value types like QualType
the pointer points into the storage of DynTypedNode, thus allowing
us to treat all the nodes the same from the point of view of a
user of the DynTypedNodes.

Adding the QualType implementation for DynTypedNode was needed
for the recursive traversal interface changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
66341c596f93d0c6475d839db94072b8ebd1cf5b 30-Aug-2012 Manuel Klimek <klimek@google.com> Fixes a bug for binding memoized match results.

Intorduces an abstraction for DynTypedNode which makes
is impossible to create in ways that introduced the bug;
also hides the implementation details of the template
magic away from the user and prepares the code for adding
QualType and TypeLoc bindings, as well as using DynTypedNode
instead of overloads for child and ancestor matching.

getNodeAs<T> was changed towards a non-pointer type, as
we'll want QualType and TypeLoc nodes to be returned
by value (the alternative would be to create new storage
which is prohibitively costly if we want to use it for
child / ancestor matching).

DynTypedNode is moved into a new header ASTTypeTraits.h,
as it is completely independent of the rest of the matcher
infrastructure - if the need comes up, we can move it to
a more common place.

The interface for users before the introduction of the
common storage change remains the same, minus the introduced
bug, for which a regression test was added.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
ec2a396c6f11b4017e30f1865f7b62c5a42425b8 29-Aug-2012 Manuel Klimek <klimek@google.com> Modifes BoundNodes to store void* and allow casting them
into the correct types when pulling them out in the result
callback in a type safe way.

This is also the base change for multiple things that will
allow handling things more generally and thus supporting more
of the AST, especially handling Type nodes.

Patch contributed by Michael Diamond.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
e16acd3817e501ee2bcf5f631b6911021fa88ba7 25-Aug-2012 Sam Panzer <espanz@gmail.com> New matcher for MaterializeTemporaryExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
2dc75ed2ef2fa3cbfd8b2ed88eb2369f3fcd98a9 24-Aug-2012 Daniel Jasper <djasper@google.com> Rename the ASTMatchers to better match AST nodes. Now, all
ASTMatchers have the same name as the corresponding AST nodes
but are lower case. The only exceptions are the "CXX" prefixes
which are not copied over to the matcher names as the goal is to
actually remove these prefixes from the AST node names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
e50ee7e513c0707302bd8e2a78befc318a7d593c 20-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Use correct matcher name in the comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
25466496a2ace2aa533abc7bac1e92a4f425e2b1 20-Aug-2012 Manuel Klimek <klimek@google.com> Fix comments and variable naming:
- use InnerMatcher consistently, fix style violations on the way
- doxygenify code snippets across all comments
- start doxygenifying code references in text
- addeed missing Usable as: sections



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
217c484522926f9fc664ec3bfaf3cffe456244b0 18-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Silence a sign compare warning that only occurs on 32 bit platforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
8456ae602783b615019a42f7d5c6f0e71639b11b 17-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> AST Matchers: introduce functionTemplate(), classTemplate() and
isExplicitTemplateSpecialization() matchers which do what their name says.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
425f41b370a8795fbca9ffc3b35e9b0ccbb15d97 16-Aug-2012 Sam Panzer <espanz@gmail.com> Matchers related to DeclStmt for matching the count of declarations, a particular declaration within the statement, and single-Decl DeclStmts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
089e5b3bf2e57da0173b170ad501867b43395385 16-Aug-2012 Sam Panzer <espanz@gmail.com> Matchers which correspond to CastExpr, IgnoreImpCasts, IgnoreParenCasts, and IgnoreParenImpCasts

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
8cc7efa2da2c6be43cbd3d09a9ae01353bb921d2 15-Aug-2012 Daniel Jasper <djasper@google.com> Add ASTMatcher for matching extern "C" function declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
297f71daa4eec8beb2eb29573e0892539f8e7172 31-Jul-2012 Manuel Klimek <klimek@google.com> Document the result type of the matcher functions where
it's not obvious from the source code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
715c9568ee5d75f25dab98229c87bcec880daf5d 25-Jul-2012 Manuel Klimek <klimek@google.com> Introduces the 'decl' matcher which was missing for a while
and became necessary with the change to require BindableMatchers
for binding.

Also fixes PR 13445: "hasSourceExpression only works for implicit casts".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
9f17408d50c1d76c5eab435e4ceb924cc10757ab 24-Jul-2012 Manuel Klimek <klimek@google.com> Introduces a new concept for binding results to matchers
as per Chandler's request:
- introduces a new matcher base type BindableMatcher that
provides the bind() call
- makes all dynamic-cast matcher creation functions return
BindableMatchers; the special case about dynamic-cast
matchers is that the node they match on and the node
their child matchers match on are the same node, just
casted to a different type; thus, there is no ambiguity
on what bind() matches on; additionally, those are the
matchers that we name with nouns in the matcher language,
so it's easy for users to intuitively know which matchers
are bindable

To make this change possible, we got rid of a non-orthogonal
implementation of thisPointerType, which had an implicit
dynamic-cast matcher from CallExpr to CXXMemberCallExpr; as
alternative, we now provide a memberCall dynamic-cast matcher
and thisPointerType is a predicate on CXXMemberCallExpr.

Last, the ArgumentAdaptingMatcher is actually not required
for the implementation of makeDynCastAllOfComposite - this
simplification makes it more obvious where the bind() call
can be used based on the matcher creation function types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
20b802d186dfc5db9b4a9ce83e9f31fa5aa4efcc 17-Jul-2012 Daniel Jasper <djasper@google.com> Make the isDerivedFrom matcher more generic.

It now accepts an arbitrary inner matcher but is fully backwards
compatible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
ff2fcb8db242a54f72bbb4e5595261e12672ed66 15-Jul-2012 Daniel Jasper <djasper@google.com> Fix spelling of anyOf matcher and add missing test.

Patch by Sam Panzer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160233 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
6a12449ec8862211856447d3df4c082a346339f2 12-Jul-2012 Daniel Jasper <djasper@google.com> This commit combines three patches to the ASTMatchers.

One adds matchers for the various parts of a for loop (initializer, condition,
increment), as well as extending the hasBody matcher to work for while and
do-while loops. The second patch adds an isInteger matcher for types.
The third patch fixes a bug in allOf, where a few of the name chages
(AllOf --> allOf) had been missed.

All matchers come with unit tests.

Patches by Sam Panzer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
e0e6b9e79a0c4edae92abd3928263875c78e23aa 10-Jul-2012 Daniel Jasper <djasper@google.com> Add more matchers and do cleanups.

Reviewers: klimek

Differential Revision: http://ec2-50-18-127-156.us-west-1.compute.amazonaws.com/D2

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/ASTMatchers/ASTMatchers.h
4da216637fa1ad4bdfd31bc265edb57ca35c2c12 06-Jul-2012 Manuel Klimek <klimek@google.com> Adds the AST Matcher library, which provides a in-C++ DSL to express
matches on interesting parts of the AST, and callback mechanisms to
act on them.




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