]> granicus.if.org Git - clang/commit
Add support for named values in the parser.
authorSamuel Benzaquen <sbenza@google.com>
Wed, 2 Apr 2014 13:11:45 +0000 (13:11 +0000)
committerSamuel Benzaquen <sbenza@google.com>
Wed, 2 Apr 2014 13:11:45 +0000 (13:11 +0000)
commit62060a01e095cf35eb9ca42a333752d12714f35c
treeba57ab4582a74411d59f566a235280ca56896a68
parent82796d3e85a440e74afba3a50ab90779b28836c5
Add support for named values in the parser.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205419 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/ASTMatchers/Dynamic/Parser.h
include/clang/ASTMatchers/Dynamic/VariantValue.h
lib/ASTMatchers/Dynamic/Parser.cpp
unittests/ASTMatchers/Dynamic/ParserTest.cpp
unittests/ASTMatchers/Dynamic/VariantValueTest.cpp