Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc][NFC] Fix extraneous namespace on Errno #80894

Merged

Conversation

michaelrj-google
Copy link
Contributor

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

The Errno type doesn't need to be explicitly namespaced now that it's
enclosed in a namespace.
@llvmbot llvmbot added the libc label Feb 6, 2024
@llvmbot
Copy link

llvmbot commented Feb 6, 2024

@llvm/pr-subscribers-libc

Author: None (michaelrj-google)

Changes

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

@michaelrj-google michaelrj-google merged commit 5ac2320 into llvm:main Feb 6, 2024
5 of 6 checks passed
@michaelrj-google michaelrj-google deleted the libcErrnoNamespaceMinorCleanup branch February 6, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants