We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 662b553 + 61f349c commit 869b6faCopy full SHA for 869b6fa
lib/Sema/TypeCheckAttr.cpp
@@ -51,7 +51,14 @@ namespace {
51
assert(!D->hasClangNode() && "Clang importer propagated a bogus attribute");
52
if (!D->hasClangNode()) {
53
SourceLoc loc = attr->getLocation();
54
- assert(loc.isValid() && "Diagnosing attribute with invalid location");
+#ifndef NDEBUG
55
+ if (!loc.isValid()) {
56
+ llvm::errs() << "Attribute '";
57
+ attr->print(llvm::errs());
58
+ llvm::errs() << "' has invalid location, failed to diagnose!\n";
59
+ assert(false && "Diagnosing attribute with invalid location");
60
+ }
61
+#endif
62
if (loc.isInvalid()) {
63
loc = D->getLoc();
64
}
0 commit comments