Provide a fixit when taking the address of an unqualified member function.
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 11 Oct 2012 22:55:07 +0000 (22:55 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 11 Oct 2012 22:55:07 +0000 (22:55 +0000)
commitc2ff8e125a1182631931ec42bc49f34a9481b8ca
treeb4ab1d62cf4bb5328b19887b154eeaa5c1205d2c
parentcdb8ef593b0f13b53e5a63af314328590fb79afc
Provide a fixit when taking the address of an unqualified member function.

This only applies if the type has a name. (we could potentially do something
crazy with decltype in C++11 to qualify members of unnamed types but that
seems excessive)

It might be nice to also suggest a fixit for "&this->i", "&foo->i",
and "&foo.i" but those expressions produce 'bound' member functions that have
a different AST representation & make error recovery a little trickier. Left
as future work.

llvm-svn: 165763
clang/lib/Sema/SemaExpr.cpp
clang/test/FixIt/fixit.cpp
clang/test/FixIt/no-fixit.cpp