[PATCH] D71842: Allow newlines in AST Matchers in clang-query files

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 8 10:59:21 PST 2020


ymandel added inline comments.


================
Comment at: clang/include/clang/ASTMatchers/Dynamic/Parser.h:167
   static llvm::Optional<DynTypedMatcher>
-  parseMatcherExpression(StringRef MatcherCode, Sema *S,
-                         const NamedValueMap *NamedValues,
-                         Diagnostics *Error);
+  parseMatcherExpression(StringRef &MatcherCode, Sema *S,
+                         const NamedValueMap *NamedValues, Diagnostics *Error);
----------------
gribozavr2 wrote:
> Sorry for the late review comment, but I'd really appreciate if you could update the doc comments to explain why MatcherCode is taken by reference, and how it is mutated.
+1 This broke our build because were passing a temporary (`foo.trim()`). An explanation at least would be appreciated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71842/new/

https://reviews.llvm.org/D71842





More information about the cfe-commits mailing list