[libc-commits] [PATCH] D140574: [libc][NFC] Use operator delete to cleanup a File object.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Jan 3 10:25:39 PST 2023


sivachandra added inline comments.


================
Comment at: libc/src/__support/File/file.h:206
+  // file.
+  static constexpr int cleanup(File *f) {
+    int close_result = f->close();
----------------
gchatelet wrote:
> Marking this function `constexpr` breaks gcc compilation as it expects all function calls down this one to be `constexpr` as well (i.e., File->close(), ...)
> 
Fixed this now but it looks like we still have some way to go with similar cleanups to make it build with GCC: https://github.com/llvm/llvm-project/commit/fa715e2dad4adfe7f8922c299250b4463e1253c9


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140574



More information about the libc-commits mailing list