VerifyICE: Pass PartialDiagnostics by reference.

llvm-svn: 155005
This commit is contained in:
Benjamin Kramer 2012-04-18 14:22:41 +00:00
parent ca45af9a75
commit 33adaae564
2 changed files with 8 additions and 7 deletions

View File

@ -6556,11 +6556,11 @@ public:
/// and reports the appropriate diagnostics. Returns false on success. /// and reports the appropriate diagnostics. Returns false on success.
/// Can optionally return the value of the expression. /// Can optionally return the value of the expression.
ExprResult VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result, ExprResult VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result,
PartialDiagnostic Diag, const PartialDiagnostic &Diag,
bool AllowFold, bool AllowFold,
PartialDiagnostic FoldDiag); const PartialDiagnostic &FoldDiag);
ExprResult VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result, ExprResult VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result,
PartialDiagnostic Diag, const PartialDiagnostic &Diag,
bool AllowFold = true) { bool AllowFold = true) {
return VerifyIntegerConstantExpression(E, Result, Diag, AllowFold, return VerifyIntegerConstantExpression(E, Result, Diag, AllowFold,
PDiag(0)); PDiag(0));

View File

@ -9438,10 +9438,11 @@ ExprResult Sema::VerifyIntegerConstantExpression(Expr *E,
PDiag(diag::err_expr_not_ice) << LangOpts.CPlusPlus); PDiag(diag::err_expr_not_ice) << LangOpts.CPlusPlus);
} }
ExprResult Sema::VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result, ExprResult
PartialDiagnostic NotIceDiag, Sema::VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result,
bool AllowFold, const PartialDiagnostic &NotIceDiag,
PartialDiagnostic FoldDiag) { bool AllowFold,
const PartialDiagnostic &FoldDiag) {
SourceLocation DiagLoc = E->getLocStart(); SourceLocation DiagLoc = E->getLocStart();
if (getLangOpts().CPlusPlus0x) { if (getLangOpts().CPlusPlus0x) {