[clang] [clang-repl] adding documentation and information for %commands (PR #150348)
David Spickett via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 29 05:32:45 PDT 2025
================
@@ -197,6 +197,20 @@ Comments:
clang-repl> // Comments in Clang-Repl
clang-repl> /* Comments in Clang-Repl */
+Help:
+=====
+
+.. code-block:: text
+
+ clang-repl>%help
+
+Undo:
+=====
+
----------------
DavidSpickett wrote:
I know it seems obvious what this does, but add a sentence at least, and a short example. Like:
```
The `%undo` command reverts the last input.
clang-repl> int a = 1; a
(int) 1
clang-repl> %undo
clang-repl> a
In file included from <<< inputs >>>:1:
input_line_2:1:1: error: use of undeclared identifier 'a'
1 | a
| ^
error: Parsing failed.
```
This one just shows that a can be printed before the undo, but not after.
https://github.com/llvm/llvm-project/pull/150348
More information about the cfe-commits
mailing list