[libc-commits] [libc] 5ac2320 - [libc][NFC] Fix extraneous namespace on Errno (#80894)

via libc-commits libc-commits at lists.llvm.org
Tue Feb 6 10:48:30 PST 2024


Author: michaelrj-google
Date: 2024-02-06T10:48:25-08:00
New Revision: 5ac2320824fd545a0d746a1d989543ec4bbd03fa

URL: https://github.com/llvm/llvm-project/commit/5ac2320824fd545a0d746a1d989543ec4bbd03fa
DIFF: https://github.com/llvm/llvm-project/commit/5ac2320824fd545a0d746a1d989543ec4bbd03fa.diff

LOG: [libc][NFC] Fix extraneous namespace on Errno (#80894)

The Errno type doesn't need to be explicitly namespaced now that it's
enclosed in a namespace.

Added: 
    

Modified: 
    libc/src/errno/libc_errno.cpp
    libc/src/errno/libc_errno.h

Removed: 
    


################################################################################
diff  --git a/libc/src/errno/libc_errno.cpp b/libc/src/errno/libc_errno.cpp
index 4af21dccc1564..30b0a67a3241d 100644
--- a/libc/src/errno/libc_errno.cpp
+++ b/libc/src/errno/libc_errno.cpp
@@ -46,5 +46,5 @@ LIBC_NAMESPACE::Errno::operator int() { return errno; }
 
 namespace LIBC_NAMESPACE {
 // Define the global `libc_errno` instance.
-LIBC_NAMESPACE::Errno libc_errno;
+Errno libc_errno;
 } // namespace LIBC_NAMESPACE

diff  --git a/libc/src/errno/libc_errno.h b/libc/src/errno/libc_errno.h
index 6a6ddbc3a9c05..5afc0a41d348a 100644
--- a/libc/src/errno/libc_errno.h
+++ b/libc/src/errno/libc_errno.h
@@ -40,7 +40,7 @@ struct Errno {
   operator int();
 };
 
-extern LIBC_NAMESPACE::Errno libc_errno;
+extern Errno libc_errno;
 
 } // namespace LIBC_NAMESPACE
 


        


More information about the libc-commits mailing list