History log of /external/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0e2c34f92f00628d48968dfea096d36381f494cb 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master clang for rebase to r230699.

Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
176edba5311f6eff0cad2631449885ddf4fbc9ea 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master Clang for rebase to r222490.

Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
b7488d77414b000ce2506b520a6b29f845fb3950 29-Oct-2013 Samuel Benzaquen <sbenza@google.com> Resubmit "Refactor DynTypedMatcher into a value type class, just like Matcher<T>."

Summary: This resubmits r193100, plus a fix for a breakage with MSVC.

Reviewers: klimek, rnk

CC: cfe-commits, revane

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
c30bf45115860b8de8628295f0d9cd86998841de 22-Oct-2013 Reid Kleckner <reid@kleckner.net> Revert "Refactor DynTypedMatcher into a value type class, just like Matcher<T>."

This reverts commit r193100.

It was failing to compile with MSVC 2012 while instantiating
llvm::Optional<DynTypedMatcher>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
341b5df7f859e640c2ea2f35c0fff553ec55ada4 21-Oct-2013 Samuel Benzaquen <sbenza@google.com> Refactor DynTypedMatcher into a value type class, just like Matcher<T>.

Summary:
Refactor DynTypedMatcher into a value type class, just like Matcher<T>.
This simplifies its usage and removes the virtual hierarchy from Matcher<T>.
It also enables planned changes to replace MatcherInteface<T>.
Too many instantiaions of this class hierarchy has been causing Registry.cpp.o to bloat in size and number of symbols.

Reviewers: klimek

CC: cfe-commits, revane

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
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/lib/ASTMatchers/ASTMatchersInternal.cpp
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/lib/ASTMatchers/ASTMatchersInternal.cpp
4f37d925927dfdd0c770702ffb22de38fc2007dc 03-Jun-2013 Samuel Benzaquen <sbenza@google.com> Add support for .bind("foo") expressions on the dynamic matchers.

Summary: Add support on the parser, registry, and DynTypedMatcher for binding IDs dynamically.

Reviewers: klimek

CC: cfe-commits, revane

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
5f684e90c2f44eda979573a01c2ed063d9adc7a8 16-Nov-2012 Daniel Jasper <djasper@google.com> Fix partial-match-bind-behavior with forEachDescendant() matchers.

The problem is that a partial match of an (explicit or implicit) allOf matcher
binds results, i.e.

recordDecl(decl().bind("x"), hasName("A"))

can very well bind a record that is not named "A". With this fix, the common
cases of stumbling over this bug are fixed by the BoundNodesMap overwriting the
results of a partial match. An error can still be created with a weird
combination of anyOf and allOf (see inactive test). We need to decide whether
this is worth fixing, as the fix will have performance impact.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
11c98771ba5d7fb1ec5707f9e1c77a6cf65bbc59 11-Nov-2012 Daniel Jasper <djasper@google.com> Fix binding of nodes in case of forEach..() matchers.

When recursively visiting the generated matches, the aggregated bindings need
to be copied during the recursion. Otherwise, we they might not be properly
overwritten (which is shown by the test), or there might be bound nodes present
that were bound on a different matching branch.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
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/lib/ASTMatchers/ASTMatchersInternal.cpp
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/lib/ASTMatchers/ASTMatchersInternal.cpp
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/lib/ASTMatchers/ASTMatchersInternal.cpp
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/lib/ASTMatchers/ASTMatchersInternal.cpp