Fix -Wreturn-type build failure on ASTMatchers, plus an intended assert

llvm-svn: 200140
This commit is contained in:
Alp Toker 2014-01-26 08:12:32 +00:00
parent 82f8c50a73
commit 14c8aff1aa
2 changed files with 2 additions and 1 deletions

View File

@ -54,6 +54,7 @@ struct ArgKind {
case AK_String:
return "string";
}
llvm_unreachable("unhandled ArgKind");
}
Kind getArgKind() const { return K; }

View File

@ -222,7 +222,7 @@ void DiagnosticsEngine::setDiagnosticMapping(diag::kind Diag, diag::Mapping Map,
// Create a new state/point and fit it into the vector of DiagStatePoints
// so that the vector is always ordered according to location.
Pos->Loc.isBeforeInTranslationUnitThan(Loc);
assert(Pos->Loc.isBeforeInTranslationUnitThan(Loc));
DiagStates.push_back(*Pos->State);
DiagState *NewState = &DiagStates.back();
GetCurDiagState()->setMappingInfo(Diag, MappingInfo);