[cfe-commits] r80606 - /cfe/trunk/lib/AST/DeclCXX.cpp
Daniel Dunbar
daniel at zuster.org
Mon Aug 31 12:16:38 PDT 2009
Author: ddunbar
Date: Mon Aug 31 14:16:38 2009
New Revision: 80606
URL: http://llvm.org/viewvc/llvm-project?rev=80606&view=rev
Log:
Fix a -Asserts warning.
Modified:
cfe/trunk/lib/AST/DeclCXX.cpp
Modified: cfe/trunk/lib/AST/DeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=80606&r1=80605&r2=80606&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclCXX.cpp (original)
+++ cfe/trunk/lib/AST/DeclCXX.cpp Mon Aug 31 14:16:38 2009
@@ -799,6 +799,7 @@
SourceLocation L,
FriendUnion Friend,
SourceLocation FriendL) {
+#ifndef NDEBUG
if (Friend.is<NamedDecl*>()) {
NamedDecl *D = Friend.get<NamedDecl*>();
assert(isa<FunctionDecl>(D) ||
@@ -807,6 +808,7 @@
isa<ClassTemplateDecl>(D));
assert(D->getFriendObjectKind());
}
+#endif
return new (C) FriendDecl(DC, L, Friend, FriendL);
}
More information about the cfe-commits
mailing list