[PATCH] Add support for named values in the parser.

Samuel Benzaquen sbenza at google.com
Mon Mar 31 10:55:31 PDT 2014


Hi klimek, pcc,

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))

http://llvm-reviews.chandlerc.com/D3229

Files:
  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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3229.1.patch
Type: text/x-patch
Size: 9453 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140331/c0d1122c/attachment.bin>


More information about the cfe-commits mailing list