MemberExpr::getMemberDecl()

Hi,
why did the return type of MemberExpr::getMemberDecl() change from
FieldDecl (which has QualType data) to NamedDecl (which doesn't)? I was
using the type information from FieldDecl for some semantic checks.

Regards,
Martin

It changed in r61294; I think it's safe to just cast to a FieldDecl if
you're dealing with pure C.

-Eli

In C++, a MemberExpr can also refer to a method (CXXMethodDecl). In C, it will always be a FieldDecl.

  - Doug

We should probably add this information as a comment to getMemberDecl(). Right now the documentation for MemberExpr is fairly spartan. Better yet, it would be nice if getMemberDecl() returned a "variant" that was either CXXMethodDecl* or FieldDecl*, making this explicit in the type system.