win: Fix unqualified lookups into dependent base classes.
C++ differentiates between dependent and non-dependent lookups. Dependent
lookups depend on a template parameter and are resolved at
end-of-translation unit, when templates are instantiated. Non-dependent
("normal") lookups are done immediately.
If a class has a template superclass and tries to access a member from the
parent, then if this is written "ptr_", it looks like a non-dependent lookup
to the compiler, but since the superclass is a template and not instantiated
yet, the lookup wouldn't find anything. (This is a bit handwavy.) Hence,
the standard requires to make it clear to the compiler that ptr_ is a dependent
lookup. This can be done by prefixing it with "T::" or something similar that's
obviously dependent on the template parameter, or with "this->" (this implicitly
depends on T).
cl.exe doesn't implement this rule, so clang-cl also looks the other way and
tries to make things work, but it's not strictly standards-conformant. This
CL fixes that.
No intended behavior change.
See http://eli.thegreenplace.net/2012/02/06/dependent-name-lookup-for-c-templates
for more details.
Fixes several warnings that look like
..\..\sandbox\win\src\service_resolver_unittest.cc(46,5) : warning(clang):
use of undeclared identifier 'target_'; unqualified lookup
into dependent bases of class template 'ResolverThunkTest'
is a Microsoft extension [-Wmicrosoft]
target_ = fake_target_;
^
this->
BUG=504657
Review URL: https://codereview.chromium.org/
1237533002
Cr-Commit-Position: refs/heads/master@{#338616}