// If this name wasn't predeclared and if this is not a function
// call, diagnose the problem.
if (R.empty()) {
+
+ // In Microsoft mode, if we are inside a template class member function
+ // and we can't resolve an identifier then assume the identifier is type
+ // dependent. The goal is to postpone name lookup to instantiation time
+ // to be able to search into type dependent base classes.
+ if (getLangOptions().MicrosoftMode && CurContext->isDependentContext() &&
+ isa<CXXMethodDecl>(CurContext))
+ return ActOnDependentIdExpression(SS, NameInfo, IsAddressOfOperand,
+ TemplateArgs);
+
if (DiagnoseEmptyLookup(S, SS, R, CTC_Unknown))
return ExprError();
template void function_missing_typename<D>();\r
\r
}\r
+\r
+\r
+\r
+namespace lookup_dependent_bases_id_expr {\r
+\r
+template<class T> class A {\r
+public:\r
+ int var;\r
+};\r
+\r
+\r
+template<class T>\r
+class B : public A<T> {\r
+public:\r
+ void f() {\r
+ var = 3;\r
+ }\r
+};\r
+\r
+template class B<int>;\r
+\r
+}
\ No newline at end of file