[PATCH] D52857: [clang-query] Add non-exclusive output API

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 29 05:10:38 PDT 2018


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM with some minor fixes.

At some point (not necessarily as part of this patch), you should also update `docs\ReleaseNotes.rst` to broadly list the new features you've been adding to clang-query.



================
Comment at: clang-query/QueryParser.cpp:285
+    if (VarStr.empty())
+      return new InvalidQuery("expected variable name");
+    if (Var == PQV_Invalid)
----------------
This seems incorrect to me; we expect the command identifier `output` here, don't we?


================
Comment at: clang-query/QueryParser.cpp:291-297
+    if (QKind == PQK_Enable) {
+      Q = parseSetOutputKind<EnableOutputQuery>();
+    } else if (QKind == PQK_Disable) {
+      Q = parseSetOutputKind<DisableOutputQuery>();
+    } else {
+      llvm_unreachable("Invalid query kind");
+    }
----------------
Elide braces here.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D52857





More information about the cfe-commits mailing list