================
@@ -370,6 +379,10 @@ int main(int argc, const char **argv) {
       if (Input == R"(%undo)") {
         if (auto Err = Interp->Undo())
           llvm::logAllUnhandledErrors(std::move(Err), llvm::errs(), "error: ");
+      } else if (Input == R"(%help)") {
+        OS << help_output << '\n';
+      } else if (Input[0] == '%') { // make sure this is evaluated last
+        OS << "Invalid % command: \"" << Input << "\". " << help_prompt;
----------------
DavidSpickett wrote:

Also I think what you've got is fine but could be improved if it were:
```
Invalid % command "<whatever>", use "%help" to list commands.
```

https://github.com/llvm/llvm-project/pull/150348
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to