r194162 - Fix diagnostic goof in r194161.

Richard Smith richard-llvm at metafoo.co.uk
Wed Nov 6 11:43:09 PST 2013


Author: rsmith
Date: Wed Nov  6 13:43:09 2013
New Revision: 194162

URL: http://llvm.org/viewvc/llvm-project?rev=194162&view=rev
Log:
Fix diagnostic goof in r194161.

Modified:
    cfe/trunk/lib/Sema/SemaExprCXX.cpp
    cfe/trunk/test/SemaCXX/operator-arrow-depth.cpp

Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=194162&r1=194161&r2=194162&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Wed Nov  6 13:43:09 2013
@@ -5219,7 +5219,7 @@ Sema::ActOnStartCXXMemberReference(Scope
     while (BaseType->isRecordType()) {
       if (OperatorArrows.size() >= getLangOpts().ArrowDepth) {
         Diag(OpLoc, diag::err_operator_arrow_depth_exceeded)
-          << BaseType << getLangOpts().ArrowDepth << Base->getSourceRange();
+          << StartingType << getLangOpts().ArrowDepth << Base->getSourceRange();
         noteOperatorArrows(*this, OperatorArrows);
         Diag(OpLoc, diag::note_operator_arrow_depth)
           << getLangOpts().ArrowDepth;
@@ -5239,7 +5239,7 @@ Sema::ActOnStartCXXMemberReference(Scope
         if (NoArrowOperatorFound) {
           if (FirstIteration) {
             Diag(OpLoc, diag::err_typecheck_member_reference_suggestion)
-              << StartingType << 1 << Base->getSourceRange()
+              << BaseType << 1 << Base->getSourceRange()
               << FixItHint::CreateReplacement(OpLoc, ".");
             OpKind = tok::period;
             break;

Modified: cfe/trunk/test/SemaCXX/operator-arrow-depth.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/operator-arrow-depth.cpp?rev=194162&r1=194161&r2=194162&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/operator-arrow-depth.cpp (original)
+++ cfe/trunk/test/SemaCXX/operator-arrow-depth.cpp Wed Nov  6 13:43:09 2013
@@ -22,5 +22,5 @@ A<MAX/2> good;
 int n = good->n;
 
 B<MAX/2 + 1> bad;
-int m = bad->n; // expected-error-re {{use of 'operator->' on type 'B<(1|5|64)>' would invoke a sequence of more than (2|10|128) 'operator->' calls}}
+int m = bad->n; // expected-error-re {{use of 'operator->' on type 'B<(2|10|128) / 2 \+ 1>' would invoke a sequence of more than (2|10|128) 'operator->' calls}}
                 // expected-note at -1 {{use -foperator-arrow-depth=N to increase 'operator->' limit}}





More information about the cfe-commits mailing list