You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
anutosh491@Anutoshs-MacBook-Air bin % ./clang-repl
clang-repl> extern "C" int printf(const char*, ...);
clang-repl> int x = 50;
clang-repl> %undo
clang-repl> const char* x = "Hello World";
clang-repl> auto r = printf("%s\n", x);
Hello World
Without the undo you would get
clang-repl> int y = 50;
clang-repl> const char* y = "Hello World";
In file included from <<< inputs >>>:1:
input_line_6:1:13: error: redefinition of 'y' with a different type: 'const char *' vs 'int'
1 | const char* y = "Hello World";
| ^
input_line_5:1:5: note: previous definition is here
1 | int y = 50;
| ^
error: Parsing failed.
When the same is attempted through xeus-cpp, it is being considered as a magic but probably should be looked at from a simple execute_request point of view .
The text was updated successfully, but these errors were encountered:
Clang-repl provides an undo option which I guess should help us get past redefinition issues .
https://llvm.org/devmtg/2022-11/slides/Lightning6-RecoveringFromErrorsInClang-ReplAndCodeUndo.pdf
For example
Without the undo you would get
When the same is attempted through xeus-cpp, it is being considered as a magic but probably should be looked at from a simple execute_request point of view .
The text was updated successfully, but these errors were encountered: