Skip to content

[libc] remove header guard for assert.h #83334

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

Merged
merged 3 commits into from
Feb 28, 2024

Conversation

nickdesaulniers
Copy link
Member

It's meant to be included multiple times! Maybe use a NOLINT rule to suppress
clang-tidy's llvm-header-guard lint warning.

It's meant to be included multiple times! Maybe use a NOLINT rule to suppress
clang-tidy's llvm-header-guard lint warning.
@llvmbot
Copy link
Member

llvmbot commented Feb 28, 2024

@llvm/pr-subscribers-libc

Author: Nick Desaulniers (nickdesaulniers)

Changes

It's meant to be included multiple times! Maybe use a NOLINT rule to suppress
clang-tidy's llvm-header-guard lint warning.


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

1 Files Affected:

  • (modified) libc/src/assert/assert.h (-5)
diff --git a/libc/src/assert/assert.h b/libc/src/assert/assert.h
index 0daf9c4e1e6166..21f6e67eb9625c 100644
--- a/libc/src/assert/assert.h
+++ b/libc/src/assert/assert.h
@@ -6,9 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIBC_SRC_ASSERT_ASSERT_H
-#define LLVM_LIBC_SRC_ASSERT_ASSERT_H
-
 #include "src/assert/__assert_fail.h"
 
 // There is no header guard here since assert is intended to be capable of being
@@ -25,5 +22,3 @@
        : LIBC_NAMESPACE::__assert_fail(#e, __FILE__, __LINE__,                 \
                                        __PRETTY_FUNCTION__))
 #endif // NDEBUG
-
-#endif // LLVM_LIBC_SRC_ASSERT_ASSERT_H

@nickdesaulniers nickdesaulniers merged commit 4df364b into llvm:main Feb 28, 2024
qiaojbao pushed a commit to GPUOpen-Drivers/llvm-project that referenced this pull request Mar 21, 2024
…2caec97de

Local branch amd-gfx fa92cae Merged main:1a7776abe6ca01996e8050dcdc8350d686a5749f into amd-gfx:f9257e604e76
Remote branch main 4df364b [libc] remove header guard for assert.h (llvm#83334)
mylai-mtk pushed a commit to mylai-mtk/llvm-project that referenced this pull request Jul 12, 2024
It's meant to be included multiple times! Maybe use a NOLINT rule to
suppress
clang-tidy's llvm-header-guard lint warning.
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.

4 participants