[PATCH] D19842: In openFileForRead, attempt to fetch the actual name of the file on disk -- including case -- so that clang can later warn about non-portable #include and #import directives.

Bruno Cardoso Lopes via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 3 09:38:08 PDT 2016


bruno added inline comments.

================
Comment at: lib/Support/Unix/Path.inc:553
@@ +552,3 @@
+namespace {
+  bool hasProcSelfFD() {
+    // If we have a /proc filesystem mounted, we can quickly establish the
----------------
eric_niebler wrote:
> bruno wrote:
> > Nice, I missed that it was used more than once. Please make hasProcSelfFD() static as well and move it inside llvm::sys::fs.
> > Please make hasProcSelfFD() static
> 
> It's in an anonymous namespace. What is the reason for preferring `static`?
> 
> > and move it inside llvm::sys::fs
> 
> It's already there.
To be coherent with the rest of the file; we are already using static for other helpers, not anonymous namespaces.


http://reviews.llvm.org/D19842





More information about the llvm-commits mailing list