[PATCH] D92531: Basic: Support named pipes natively in SourceManager

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 18 16:01:42 PST 2020


arphaman added a comment.

Left one minor suggestion , but LGTM otherwise



================
Comment at: clang/lib/Basic/SourceManager.cpp:167
+  // (which may have come from a stat cache).
+  if (ContentsEntry->isNamedPipe()) {
+    // Check the buffer size directly if this is a named pipe.
----------------
Would it make sense to do the `diagnoseFileTooLarge` check for both files and named pipes here unconditionally instead of having two separate checks? It appears that it shouldn't really matter if we check the ContentsEntry or the Buffer size for regular files, as their sizes are expected to match anyway.


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

https://reviews.llvm.org/D92531



More information about the cfe-commits mailing list