[clang] 8b435c1 - ASTTests: Suppress a warning in -Asserts for #95202 [-Wunused-variable]

NAKAMURA Takumi via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 13 01:35:01 PDT 2024


Author: NAKAMURA Takumi
Date: 2024-06-13T17:34:39+09:00
New Revision: 8b435c18314e62530367a8721883a28c532e02ad

URL: https://github.com/llvm/llvm-project/commit/8b435c18314e62530367a8721883a28c532e02ad
DIFF: https://github.com/llvm/llvm-project/commit/8b435c18314e62530367a8721883a28c532e02ad.diff

LOG: ASTTests: Suppress a warning in -Asserts for #95202 [-Wunused-variable]

Added: 
    

Modified: 
    clang/unittests/AST/ProfilingTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/AST/ProfilingTest.cpp b/clang/unittests/AST/ProfilingTest.cpp
index ed81f4e1c5f2f..27a4a197f1cbf 100644
--- a/clang/unittests/AST/ProfilingTest.cpp
+++ b/clang/unittests/AST/ProfilingTest.cpp
@@ -34,8 +34,10 @@ static auto getClassTemplateRedecls() {
       Res.push_back(CTD);
   }
   assert(Res.size() == 3);
+#ifndef NDEBUG
   for (auto &&I : Res)
     assert(I->getCanonicalDecl() == Res[0]);
+#endif
   return std::make_tuple(std::move(AST), Res[1], Res[2]);
 }
 


        


More information about the cfe-commits mailing list