[libc-commits] [PATCH] D147008: [libc][bazel] add file printf targets and support
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Apr 24 11:22:03 PDT 2023
sivachandra added inline comments.
================
Comment at: libc/src/__support/CPP/OwnedString.h:1
+//===-- Implementation of a struct to hold a string in menory -------------===//
+//
----------------
michaelrj wrote:
> sivachandra wrote:
> > This class should live outside of the `CPP` directory.
> I can't move it out of `CPP` because it's included from `LibcTest.h` and `LibcTest.h` specifies that it can only include headers from `TestUtils` and `CPP`.
That comment should be fixed. The previous `testutils` now live in `__support`.
================
Comment at: libc/src/__support/CPP/cstring.h:18
+// a return value for a function that in C would return a char* and a flag for
+// if that char* needs to be freed.
+class CString {
----------------
Is this comment correct?
================
Comment at: libc/src/__support/CPP/cstring.h:31
+ str = in_str;
+ cstr = str.c_str();
+ }
----------------
Whats the idea behind keeping a `cstr` member?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147008/new/
https://reviews.llvm.org/D147008
More information about the libc-commits
mailing list