[patch] Fix access computation of default arguments in template classes

Hi,

the attached patch fixes http://http://llvm.org/pr8479 "clang
evaluates visibility of default parameters at the call site instead of
at parameter definition site".

The problem was that Sema::BuildCXXDefaultArgExpr didn't update the
current decl context before calling SubstExpr(), so that the default
parameter access was checked with the decl context of the template
instantiation site. Please review.

Nico

clang-template-friend-default-arg.patch (2.27 KB)

Looks great, thanks!

  - Doug