Per [basic.lookup.classref]p3, in an expression of the form p->~type-name, the
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 15 Nov 2012 00:31:27 +0000 (00:31 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 15 Nov 2012 00:31:27 +0000 (00:31 +0000)
commitaf41696bc45c3a4e5e5a4e62f177e87b184eb5e7
treebc8e1cca26b3c7221c68dca0bf03174ac42cf0ee
parent37feb2d6a65f84baa4c299871636a49a8e3a8eb9
Per [basic.lookup.classref]p3, in an expression of the form p->~type-name, the
type-name is looked up in the context of the complete postfix-expression. Don't
forget to pass the scope into this lookup when the type-name is a template-id;
it might name an alias template which can't be found within the class itself.

Bug spotted by Johannes Schaub on #llvm.

llvm-svn: 168011
clang/lib/Sema/SemaTemplate.cpp
clang/test/SemaCXX/member-expr.cpp
clang/test/SemaCXX/pseudo-destructors.cpp