diff --git a/clang/unittests/AST/ProfilingTest.cpp b/clang/unittests/AST/ProfilingTest.cpp index ed81f4e1c5f2fb..27a4a197f1cbfa 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]); }