[PATCH] Adding 4 ASTMatchers: typedefDecl, isInMainFile, isInSystemFile, isInFileMatchingName

Hendrik von Prince raise.rescue at gmail.com
Sat Oct 18 14:06:12 PDT 2014


I updated it accordingly to the comments (thanks!).
One of the changes is the replacement of an initializer list through an explicit call to the default-constructor of std::vector<std::pair<std::string, std::string>>, to initialize the new introduced VirtualMappedFiles-parameter of the functions runToolOnCodeWithArgs and matchesConditionally. Due to the repeated usage of the type-declaration, it would be nice to declare a typedef for std::vector<std::pair<std::string, std::string>>, that could also be used for the RemappedFiles-instance-variable of the class PreprocessorOptions. 
If it is appropriate to add the typedef, where should I add it and how should I name it?

http://reviews.llvm.org/D4283

Files:
  include/clang/ASTMatchers/ASTMatchers.h
  include/clang/Tooling/Tooling.h
  lib/ASTMatchers/Dynamic/Registry.cpp
  lib/Tooling/Tooling.cpp
  unittests/ASTMatchers/ASTMatchersTest.cpp
  unittests/ASTMatchers/ASTMatchersTest.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4283.15123.patch
Type: text/x-patch
Size: 10279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141018/4baaad92/attachment.bin>


More information about the cfe-commits mailing list