]> granicus.if.org Git - clang/commitdiff
Fix Wundef NDEBUG warning; NFC
authorSven van Haastregt <sven.vanhaastregt@arm.com>
Mon, 24 Sep 2018 12:12:03 +0000 (12:12 +0000)
committerSven van Haastregt <sven.vanhaastregt@arm.com>
Mon, 24 Sep 2018 12:12:03 +0000 (12:12 +0000)
Check for definedness of the NDEBUG macro rather than its value,
to be consistent with other uses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342876 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/ParsedAttr.cpp

index b8d57e2272ec528e49a644c3f6112e7edfd1e5dc..3dff0ad63e227b6b8c41fe9bbca87485b717ae5c 100644 (file)
@@ -82,7 +82,7 @@ void AttributeFactory::deallocate(ParsedAttr *Attr) {
   if (freeListIndex >= FreeLists.size())
     FreeLists.resize(freeListIndex + 1);
 
-#if !NDEBUG
+#ifndef NDEBUG
   // In debug mode, zero out the attribute to help find memory overwriting.
   memset(Attr, 0, size);
 #endif