[PATCH] D64573: [Syntax] Allow to mutate syntax trees

Karl-Johan Karlsson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 20 02:58:36 PST 2019


Ka-Ka added inline comments.


================
Comment at: clang/lib/Tooling/Syntax/Mutations.cpp:74
+
+  if (auto *Parent = llvm::dyn_cast<CompoundStatement>(S->parent())) {
+    // A child of CompoundStatement can just be safely removed.
----------------
This line introduce a buildbot fail:

/home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/clang/lib/Tooling/Syntax/Mutations.cpp:74:13: warning: unused variable ‘Parent’ [-Wunused-variable]



================
Comment at: clang/lib/Tooling/Syntax/Tokens.cpp:70
   assert(F.file() == L.file() && "tokens from different files");
-  assert(F.endOffset() <= L.beginOffset() && "wrong order of tokens");
+  assert(F == L || F.endOffset() <= L.beginOffset() && "wrong order of tokens");
   return FileRange(F.file(), F.beginOffset(), L.endOffset());
----------------
This line introduce a buildbot failure:

/home/buildbots/ppc64be-clang-multistage-test/clang-ppc64be-multistage/llvm/clang/lib/Tooling/Syntax/Tokens.cpp:70:53: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64573





More information about the cfe-commits mailing list