-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[clang-repl] add %help, documentation, and tests for %commands #150348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
DavidSpickett
merged 20 commits into
llvm:main
from
aadanen:percent_command_documentation
Aug 5, 2025
Merged
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
4e24cb2
added undo to docs in same format as %quit
aadanen 752e490
implemented %help
aadanen 99e2421
blurb about %help on startup. better %help format
aadanen f1f6d9c
small change to opener message
aadanen 1cd23df
added %help to docs
aadanen cde1b98
got rid of printf(), added bad % command handling
aadanen d5b1c8a
Removed %help prompt. Fixed % command parsing.
aadanen b7821e5
added %lib to %help output
aadanen 05516ca
Reformatted comment grammer
aadanen ec701ca
updated documentation
aadanen 94f3128
switched from raw_ostream to logging errors
aadanen 54ea08c
reverted clang-format on one spot
aadanen fafd7bd
fixed documentation
aadanen 4ceeef5
moved string and deleted bad comment
aadanen a84ff32
should move this string as well
aadanen 3b3d5f6
added tests for %help, %lib, and invalid %commands
aadanen 264b08b
Merge branch 'llvm:main' into percent_command_documentation
aadanen 9593d1e
switched to raw_ostream
aadanen e61f8ab
removed extra \n in docs
aadanen 8f523e0
simplified raw_ostream usage
aadanen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| // RUN: cat %s | clang-repl 2>&1 | FileCheck %s | ||
| %foobar | ||
| // CHECK: Invalid % command "%foobar", use "%help" to list commands | ||
| %quit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| // RUN: cat %s | clang-repl 2>&1 | FileCheck %s | ||
| %lib | ||
| // CHECK: %lib expects 1 argument: the path to a dynamic library | ||
| %quit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| // RUN: cat %s | clang-repl | FileCheck %s | ||
| %help | ||
| // CHECK: %help list clang-repl %commands | ||
| // CHECK-NEXT: %undo undo the previous input | ||
| // CHECK-NEXT: %lib <path> link a dynamic library | ||
| // CHECK-NEXT: %quit exit clang-repl | ||
| %quit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.