From: Daniel Dunbar Date: Mon, 31 Aug 2009 19:16:38 +0000 (+0000) Subject: Fix a -Asserts warning. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e32ecce8a181640c2f3d3939f9a9bfe8927df767;p=clang Fix a -Asserts warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80606 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp index 1da4c4e209..b6072d8acd 100644 --- a/lib/AST/DeclCXX.cpp +++ b/lib/AST/DeclCXX.cpp @@ -799,6 +799,7 @@ FriendDecl *FriendDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, FriendUnion Friend, SourceLocation FriendL) { +#ifndef NDEBUG if (Friend.is()) { NamedDecl *D = Friend.get(); assert(isa(D) || @@ -807,6 +808,7 @@ FriendDecl *FriendDecl::Create(ASTContext &C, DeclContext *DC, isa(D)); assert(D->getFriendObjectKind()); } +#endif return new (C) FriendDecl(DC, L, Friend, FriendL); }