]> granicus.if.org Git - clang/commitdiff
VerifyICE: Pass PartialDiagnostics by reference.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 18 Apr 2012 14:22:41 +0000 (14:22 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 18 Apr 2012 14:22:41 +0000 (14:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155005 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Sema/Sema.h
lib/Sema/SemaExpr.cpp

index c845ee554996643382e7a02f4ccf1273ced8cb59..8ac7c3ee01a33413cae81bd495212b585d3e008b 100644 (file)
@@ -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));
index fd54499c9e5f661c7ffb2a9efd587e0731bacbfc..669ba3ad37611ec53604d7cfc4e1f87910f2c03b 100644 (file)
@@ -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) {