[PATCH] D30854: [ASTMatchers] Add ObjC matchers for fundamental decls

Dave Lee via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 15 12:30:36 PDT 2017


kastiglione added inline comments.


================
Comment at: unittests/ASTMatchers/ASTMatchersTest.h:64
     const std::string &Code, const T &AMatcher, bool ExpectMatch,
-    llvm::StringRef CompileArg,
+    std::vector<std::string> Args,
     const FileContentMappings &VirtualMappedFiles = FileContentMappings(),
----------------
aaron.ballman wrote:
> kastiglione wrote:
> > aaron.ballman wrote:
> > > I think this might be better as an `llvm::ArrayRef<llvm::StringRef>`.
> > Ok. It needs to be a `std::vector<std::string>` for `runToolOnCodeWithArgs()`. I don't see any built in way to do that conversion, so this function will have to manually do that I guess?
> Can you do:
> ```
> std::vector<std::string> LocalArgs(Args.begin(), Args.end());
> LocalArgs.insert(LocalArgs.end(), {"everything else"});
> ```
> below?
right, thanks!


https://reviews.llvm.org/D30854





More information about the cfe-commits mailing list