Skip to content
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
14 changes: 4 additions & 10 deletions lib/Sema/ConstraintSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -1287,16 +1287,10 @@ class ConstraintSystem {

/// Get the type for an expression.
Type getType(Expr *E) {
// FIXME: Ideally this would be enabled but there are currently
// cases where we ask for types that are not set.

// assert(ExprTypes.find(E) != ExprTypes.end() &&
// "Expected type to have been set!");

// FIXME: Temporary until all references to expression types are
// updated.
// return ExprTypes[E];
return E->getType();
assert(hasType(E) && "Expected type to have been set!");
assert(ExprTypes[E]->isEqual(E->getType()) &&
"Expected type in map to be the same type in expression!");
return ExprTypes[E];
}

/// Cache the type of the expression argument and return that same
Expand Down