diff --git a/clang/include/clang/AST/DeclContextInternals.h b/clang/include/clang/AST/DeclContextInternals.h index e169c48592192..0acd9df9e1572 100644 --- a/clang/include/clang/AST/DeclContextInternals.h +++ b/clang/include/clang/AST/DeclContextInternals.h @@ -244,7 +244,11 @@ class StoredDeclsList { // FIXME: Move the assert before the single decl case when we fix the // duplication coming from the ASTReader reading builtin types. - assert(!llvm::is_contained(getLookupResult(), D) && "Already exists!"); + + // SWIFT: FIXME^2: This assertion causes problems in Swift's ClangImporter. + // SWIFT: We should probably set its ASTContext to Objective-C++ mode to avoid it. + // SWIFT: assert(!llvm::is_contained(getLookupResult(), D) && "Already exists!"); + // Determine if this declaration is actually a redeclaration. for (DeclListNode *N = getAsList(); /*return in loop*/; N = N->Rest.dyn_cast()) {