[libc-commits] [libc] [libc] fix clang-tidy llvm-header-guard warnings (PR #82679)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Tue Feb 27 16:20:16 PST 2024


nickdesaulniers wrote:

Note: when `--fix` does work, it also renames some header guards. Example:
```diff
diff --git a/libc/src/__support/CPP/type_traits/is_fixed_point.h b/libc/src/__support/CPP/type_traits/is_fixed_point.h
index 317ba39748b7..025268bc2979 100644
--- a/libc/src/__support/CPP/type_traits/is_fixed_point.h
+++ b/libc/src/__support/CPP/type_traits/is_fixed_point.h
@@ -43,4 +43,4 @@ LIBC_INLINE_VAR constexpr bool is_fixed_point_v = is_fixed_point<T>::value;
 
 } // namespace LIBC_NAMESPACE::cpp
 
-#endif // LLVM_LIBC_SRC___SUPPORT_CPP_TYPE_TRAITS_IS_INTEGRAL_H
+#endif // LLVM_LIBC_SRC___SUPPORT_CPP_TYPE_TRAITS_IS_FIXED_POINT_H
diff --git a/libc/src/__support/GPU/generic/utils.h b/libc/src/__support/GPU/generic/utils.h
index 58db88dce1ca..3139604ac644 100644
```
(This is good, just heads up to reviewers that some guards will also be renamed in this PR).

>  it's probably fine for that prefix to just be LLVM_LIBC_ since it's unlikely to have any collisions.

:+1: SGTM

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


More information about the libc-commits mailing list