[PATCH] D102402: LineEditor: Add a bare-bones readline-based implementation

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 16 16:52:09 PDT 2021


dblaikie added inline comments.


================
Comment at: llvm/lib/LineEditor/LineEditor.cpp:39-40
+        return Optional<std::string>();
+      else
+        return Line;
+    }
----------------
Skip else-after-return


================
Comment at: llvm/lib/LineEditor/LineEditor.cpp:374
+                       FILE *Out, FILE *Err)
+    : Prompt((ProgName + "> ").str()), Data(new InternalData) {
+  Data->In = In;
----------------
prefer `std::make_unique` here, perhaps (makes it a bit easier to read/clear this member isn't a raw pointer/risk of leaks)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102402/new/

https://reviews.llvm.org/D102402



More information about the llvm-commits mailing list