From d448ce0932708038adb93456b817722a314b647f Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 18 Apr 2012 14:22:41 +0000 Subject: [PATCH] VerifyICE: Pass PartialDiagnostics by reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155005 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Sema/Sema.h | 6 +++--- lib/Sema/SemaExpr.cpp | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index c845ee5549..8ac7c3ee01 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -6556,11 +6556,11 @@ public: /// 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)); diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index fd54499c9e..669ba3ad37 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -9438,10 +9438,11 @@ ExprResult Sema::VerifyIntegerConstantExpression(Expr *E, 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) { -- 2.40.0