https://github.com/svenvh created 
https://github.com/llvm/llvm-project/pull/170153

The `NDEBUG` macro is tested for defined-ness everywhere else. The instance 
here triggers a warning when compiling with `-Wundef`.

>From 303ccf0807bda737de76ec6430f6783c14dfeab8 Mon Sep 17 00:00:00 2001
From: Sven van Haastregt <[email protected]>
Date: Mon, 1 Dec 2025 13:55:44 +0000
Subject: [PATCH] Fix NDEBUG Wundef warning; NFC

The `NDEBUG` macro is tested for defined-ness everywhere else. The
instance here triggers a warning when compiling with `-Wundef`.
---
 clang/include/clang/Basic/TokenKinds.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/include/clang/Basic/TokenKinds.h 
b/clang/include/clang/Basic/TokenKinds.h
index d84f3598cbf33..a801113c57715 100644
--- a/clang/include/clang/Basic/TokenKinds.h
+++ b/clang/include/clang/Basic/TokenKinds.h
@@ -98,7 +98,7 @@ inline bool isLiteral(TokenKind K) {
   const bool isInLiteralRange =
       K >= tok::numeric_constant && K <= tok::utf32_string_literal;
 
-#if !NDEBUG
+#ifndef NDEBUG
   const bool isLiteralExplicit =
       K == tok::numeric_constant || K == tok::char_constant ||
       K == tok::wide_char_constant || K == tok::utf8_char_constant ||

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to