Commit Graph

416 Commits

Author SHA1 Message Date
Chad Rosier 4577cd3036 Add various MC components to clang build to support MS-style inline assembly.
llvm-svn: 161498
2012-08-08 16:27:29 +00:00
Daniel Jasper 8bd14aab3a Add missing tests for class template specialization and template
argument matchers.

llvm-svn: 161102
2012-08-01 08:40:24 +00:00
Daniel Jasper 3cb72b476d Fix for ASTMatchFinder to visit a functions parameter declarations.
llvm-svn: 160947
2012-07-30 05:03:25 +00:00
Manuel Klimek e923569b1b 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".

llvm-svn: 160716
2012-07-25 10:02:02 +00:00
Manuel Klimek 86f8bbced4 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.

llvm-svn: 160673
2012-07-24 13:37:29 +00:00
Daniel Jasper 1975e03494 Move RefactoringCallbacks to Tooling to avoid dependency from
ASTMatchers (lower level abstraction) to Tooling (higher level
abstraction).

llvm-svn: 160351
2012-07-17 08:03:01 +00:00
Daniel Jasper 2b3c7d414b Make the isDerivedFrom matcher more generic.
It now accepts an arbitrary inner matcher but is fully backwards
compatible.

llvm-svn: 160348
2012-07-17 07:39:27 +00:00
Daniel Jasper 7e22282b68 Add refactoring callbacks to make common kinds of refactorings easy.
llvm-svn: 160255
2012-07-16 09:18:17 +00:00
Daniel Jasper 84c763edbe Fix spelling of anyOf matcher and add missing test.
Patch by Sam Panzer!

llvm-svn: 160233
2012-07-15 19:57:12 +00:00
Daniel Jasper 4e566c4aed 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!

llvm-svn: 160115
2012-07-12 08:50:38 +00:00
Daniel Jasper 1dad183b38 Add more matchers and do cleanups.
Reviewers: klimek

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

llvm-svn: 160013
2012-07-10 20:20:19 +00:00
Benjamin Kramer 60d7f5a1d7 Disable death tests on platforms which don't support them.
llvm-svn: 160000
2012-07-10 17:30:44 +00:00
Manuel Klimek a9c86c980b Fixes the MSVC build.
llvm-svn: 159992
2012-07-10 14:21:30 +00:00
Manuel Klimek 2cf1ce7f1f Another fix for the configure build: correct order of dependencies.
llvm-svn: 159809
2012-07-06 08:13:45 +00:00
Manuel Klimek cb93f785de Build-fix: Remove non-existent directories from Makefiles.
llvm-svn: 159807
2012-07-06 06:00:30 +00:00
Manuel Klimek 04616e4776 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.

llvm-svn: 159805
2012-07-06 05:48:52 +00:00