On Fri, Jan 15, 2010 at 4:26 PM, Douglas Gregor <[email protected]> wrote: > > On Jan 15, 2010, at 4:00 PM, Eli Friedman wrote: > >> Author: efriedma >> Date: Fri Jan 15 18:00:48 2010 >> New Revision: 93592 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=93592&view=rev >> Log: >> Make the AST explicitly represent the cast of the first operand of a >> pointer-to-member operator. >> >> >> Modified: >> cfe/trunk/lib/Sema/SemaExprCXX.cpp >> cfe/trunk/test/CodeGenCXX/member-function-pointers.cpp >> >> Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=93592&r1=93591&r2=93592&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> ====================================================================== >> --- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original) >> +++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Fri Jan 15 18:00:48 2010 >> @@ -1450,12 +1450,14 @@ >> // overkill? >> if (!IsDerivedFrom(LType, Class, Paths) || >> Paths.isAmbiguous(Context.getCanonicalType(Class))) { >> - const char *ReplaceStr = isIndirect ? ".*" : "->*"; >> Diag(Loc, diag::err_bad_memptr_lhs) << OpSpelling >> - << (int)isIndirect << lex->getType() << >> - CodeModificationHint::CreateReplacement(SourceRange(Loc), >> ReplaceStr); >> + << (int)isIndirect << lex->getType(); >> return QualType(); > > This code-modification hint was broken before, I assume? > > - Doug >
Yes; the hint didn't follow the recovery, and it was quite likely to be wrong. -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
