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

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Dec 27 02:50:00 PST 2022


gchatelet added inline comments.


================
Comment at: libc/src/__support/File/file.h:206
+  // file.
+  static constexpr int cleanup(File *f) {
+    int close_result = f->close();
----------------
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(), ...)



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