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

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


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: None (michaelrj-google)

<details>
<summary>Changes</summary>

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


---
Full diff: https://github.com/llvm/llvm-project/pull/80894.diff


2 Files Affected:

- (modified) libc/src/errno/libc_errno.cpp (+1-1) 
- (modified) libc/src/errno/libc_errno.h (+1-1) 


``````````diff
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
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/80894


More information about the libc-commits mailing list