[libc-commits] [libc] 4df364b - [libc] remove header guard for assert.h (#83334)

via libc-commits libc-commits at lists.llvm.org
Wed Feb 28 13:19:43 PST 2024


Author: Nick Desaulniers
Date: 2024-02-28T13:19:40-08:00
New Revision: 4df364bc93af49ae413ec1ae8328f34ac70730c4

URL: https://github.com/llvm/llvm-project/commit/4df364bc93af49ae413ec1ae8328f34ac70730c4
DIFF: https://github.com/llvm/llvm-project/commit/4df364bc93af49ae413ec1ae8328f34ac70730c4.diff

LOG: [libc] remove header guard for assert.h (#83334)

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

Added: 
    

Modified: 
    libc/src/assert/assert.h

Removed: 
    


################################################################################
diff  --git a/libc/src/assert/assert.h b/libc/src/assert/assert.h
index 0daf9c4e1e6166..6f352af1988b37 100644
--- a/libc/src/assert/assert.h
+++ b/libc/src/assert/assert.h
@@ -1,3 +1,4 @@
+// NOLINT(llvm-header-guard) https://github.com/llvm/llvm-project/issues/83339
 //===-- Internal header for assert ------------------------------*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -6,9 +7,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 +23,3 @@
        : LIBC_NAMESPACE::__assert_fail(#e, __FILE__, __LINE__,                 \
                                        __PRETTY_FUNCTION__))
 #endif // NDEBUG
-
-#endif // LLVM_LIBC_SRC_ASSERT_ASSERT_H


        


More information about the libc-commits mailing list