Skip to content

Commit 61f349c

Browse files
committed
add #ifndef NDEBUG
1 parent 60800e1 commit 61f349c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Sema/TypeCheckAttr.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ namespace {
5151
assert(!D->hasClangNode() && "Clang importer propagated a bogus attribute");
5252
if (!D->hasClangNode()) {
5353
SourceLoc loc = attr->getLocation();
54+
#ifndef NDEBUG
5455
if (!loc.isValid()) {
5556
llvm::errs() << "Attribute '";
5657
attr->print(llvm::errs());
5758
llvm::errs() << "' has invalid location, failed to diagnose!\n";
5859
assert(false && "Diagnosing attribute with invalid location");
5960
}
61+
#endif
6062
if (loc.isInvalid()) {
6163
loc = D->getLoc();
6264
}

0 commit comments

Comments
 (0)