This patch adds a suggestion and related fixit for when a member reference using '.' such as "foo.bar()" fails because bar() is not a member of foo, but foo defines an operator-> and bar() is a member of the object returned by foo's operator->. A more concrete case where this is helpful is with classes like std::shared_ptr or even clang's QualType that have an operator-> and the user accidentally types "." where they meant to use "->" (since, you know, the variables in question aren't actually pointers).
I'd like some pre-commit feedback since: * while it's a fairly simple patch, there is some ugliness to it for trying out the correction to see if it causes additional errors, * the error text feels a bit verbose, though it's hardly the longest error message and I can't think of a good way to shorten it, and * I am undecided whether there should be an accompanying note, and if so what the note should refer to. Thanks, Kaelyn
fix-dot-to-overloaded-arrow-operator.diff
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
