Skip to content

Commit 0ba0ec0

Browse files
adrian-prantlaugusto2112
authored andcommitted
Disable assertion
hotfix for rdar://82037935 (cherry picked from commit f9cbdd3) (cherry picked from commit 96e3b77)
1 parent 50a32b4 commit 0ba0ec0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clang/include/clang/AST/DeclContextInternals.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,11 @@ class StoredDeclsList {
237237

238238
// FIXME: Move the assert before the single decl case when we fix the
239239
// duplication coming from the ASTReader reading builtin types.
240-
assert(!llvm::is_contained(getLookupResult(), D) && "Already exists!");
240+
241+
// SWIFT: FIXME^2: This assertion causes problems in Swift's ClangImporter.
242+
// SWIFT: We should probably set its ASTContext to Objective-C++ mode to avoid it.
243+
// SWIFT: assert(!llvm::is_contained(getLookupResult(), D) && "Already exists!");
244+
241245
// Determine if this declaration is actually a redeclaration.
242246
for (DeclListNode *N = getAsList(); /*return in loop*/;
243247
N = N->Rest.dyn_cast<DeclListNode *>()) {

0 commit comments

Comments
 (0)