Author: Sven van Haastregt
Date: 2025-12-02T10:24:11+01:00
New Revision: 0dec52b2c3f8d9b94c7ca8aadc0da7a1ed5055d7

URL: 
https://github.com/llvm/llvm-project/commit/0dec52b2c3f8d9b94c7ca8aadc0da7a1ed5055d7
DIFF: 
https://github.com/llvm/llvm-project/commit/0dec52b2c3f8d9b94c7ca8aadc0da7a1ed5055d7.diff

LOG: Fix NDEBUG Wundef warning; NFC (#170153)

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

Added: 
    

Modified: 
    clang/include/clang/Basic/TokenKinds.h

Removed: 
    


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