summaryrefslogtreecommitdiffstats
path: root/clang/unittests/ASTMatchers/Dynamic/VariantValueTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace some const std::string & with llvm::StringRef or std::stringYaron Keren2015-07-061-3/+3
| | | | | | | | and std::move to avoid implicit std::string construction. Patch by Eugene Kosov. llvm-svn: 241433
* Add support for named values in the parser.Samuel Benzaquen2014-04-141-0/+25
| | | | | | | | | | | | Summary: Add support for named values in the parser. Reviewers: pcc CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D3276 llvm-svn: 206176
* Revert "Add support for named values in the parser."Samuel Benzaquen2014-04-031-7/+0
| | | | | | | | This was submitted before it was ready. This reverts commit 62060a01e095cf35eb9ca42a333752d12714f35c. llvm-svn: 205533
* Add support for named values in the parser.Samuel Benzaquen2014-04-021-0/+7
| | | | | | | | | | | | | | | | | | | | Summary: Add support for named values in the parser. This allows injection of arbitrary constants using a custom Sema object. Completions are not supported right now. Will be used by clang_query to support the 'let' command. Usage example: clang_query> let unique_ptr recordDecl(hasName("unique_ptr")) clang_query> match varDecl(hasType(unique_ptr)) Reviewers: klimek, pcc CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D3229 llvm-svn: 205419
* DynamicASTMatchers/VariantValueTest.cpp: It works with msvcrt since ↵NAKAMURA Takumi2014-01-121-1/+1
| | | | | | setmode(stderr, O_BINARY) were removed. llvm-svn: 199059
* Reduce the number of symbols by changing how templates are instantiated per ↵Samuel Benzaquen2013-08-301-16/+21
| | | | | | | | | | | | | | | | function bound in the registry. Summary: Reduce the number of symbols by changing how templates are instantiated per function bound in the registry. This change reduces the number of sections in Registry.cpp.o by a little over 10%. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1557 llvm-svn: 189676
* Refactor "MatcherList" into "VariantMatcher" and abstract the notion of a ↵Samuel Benzaquen2013-08-131-23/+30
| | | | | | | | | | | | | | | | list of matchers for the polymorphic case. Summary: Refactor "MatcherList" into "VariantMatcher" and abstract the notion of a list of matchers for the polymorphic case. This work is to support future changes needed for eachOf/allOf/anyOf matchers. We will add a new type on VariantMatcher. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1365 llvm-svn: 188272
* Add support for polymorphic matchers. Use runtime type checking to determine ↵Samuel Benzaquen2013-06-211-28/+28
| | | | | | the right polymorphic overload to use. llvm-svn: 184558
* Disable an assertion death test when using MSVC's assert()Reid Kleckner2013-06-211-3/+5
| | | | | | | MSVC's debug runtime prints assertion failures in wide characters, which gtest doesn't understand. llvm-svn: 184544
* Enhancements for the DynTypedMatcher system.Samuel Benzaquen2013-06-201-31/+40
| | | | | | | | | - Added conversion routines and checks in Matcher<T> that take a DynTypedMatcher. - Added type information on the error messages for the marshallers. - Allows future work on Polymorphic/overloaded matchers. We should be able to disambiguate at runtime and choose the appropriate overload. llvm-svn: 184429
* Parser/Registry argument enhancements.Samuel Benzaquen2013-06-041-0/+24
| | | | | | | | | | | | | | | Summary: Parser/Registry argument enhancements. - 2 argument support. - unsigned values support. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D915 llvm-svn: 183231
* First revision of the dynamic ASTMatcher library.Manuel Klimek2013-05-141-0/+97
This library supports all the features of the compile-time based ASTMatcher library, but allows the user to specify and construct the matchers at runtime. It contains the following modules: - A variant type, to be used by the matcher factory. - A registry, where the matchers are indexed by name and have a factory method with a generic signature. - A simple matcher expression parser, that can be used to convert a matcher expression string into actual matchers that can be used with the AST at runtime. Many features where omitted from this first revision to simplify this code review. The main ideas are still represented in this change and it already has support working use cases. Things that are missing: - Support for polymorphic matchers. These requires supporting code in the registry, the marshallers and the variant type. - Support for numbers, char and bool arguments to the matchers. This requires supporting code in the parser and the variant type. - A command line program putting everything together and providing an already functional tool. Patch by Samuel Benzaquen. llvm-svn: 181768
OpenPOWER on IntegriCloud