Skip to content

Disable assertion #9237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion clang/include/clang/AST/DeclContextInternals.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<DeclListNode *>()) {
Expand Down