/// and reports the appropriate diagnostics. Returns false on success.
/// Can optionally return the value of the expression.
ExprResult VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result,
- PartialDiagnostic Diag,
+ const PartialDiagnostic &Diag,
bool AllowFold,
- PartialDiagnostic FoldDiag);
+ const PartialDiagnostic &FoldDiag);
ExprResult VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result,
- PartialDiagnostic Diag,
+ const PartialDiagnostic &Diag,
bool AllowFold = true) {
return VerifyIntegerConstantExpression(E, Result, Diag, AllowFold,
PDiag(0));
PDiag(diag::err_expr_not_ice) << LangOpts.CPlusPlus);
}
-ExprResult Sema::VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result,
- PartialDiagnostic NotIceDiag,
- bool AllowFold,
- PartialDiagnostic FoldDiag) {
+ExprResult
+Sema::VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result,
+ const PartialDiagnostic &NotIceDiag,
+ bool AllowFold,
+ const PartialDiagnostic &FoldDiag) {
SourceLocation DiagLoc = E->getLocStart();
if (getLangOpts().CPlusPlus0x) {