[PATCH] [MSVC] Improved lookup into dependent/non-dependent bases of dependent class

Reid Kleckner rnk at google.com
Wed Feb 4 16:42:49 PST 2015


Looks pretty good.


================
Comment at: lib/Sema/SemaDecl.cpp:132
@@ +131,3 @@
+namespace {
+enum BasesLookupResult { NotFound, FoundNotType, FoundType };
+} // namespace
----------------
"FoundNonType" would be closer to the standardese terminology of "non-type template parameter"

================
Comment at: lib/Sema/SemaDecl.cpp:159-160
@@ +158,4 @@
+        FoundTypeDecl = FoundType;
+      }
+    } else if (auto *TST =
+                   Base.getType()->getAs<TemplateSpecializationType>()) {
----------------
You can reduce the indentation here with continue.

================
Comment at: test/SemaTemplate/ms-lookup-template-base-classes.cpp:411
@@ -392,2 +410,3 @@
+C<int> c; // expected-note {{in instantiation of template class 'type_in_base_of_multiple_dependent_bases::C<int>' requested here}}
 }
 
----------------
Can you add a test for the case where we look through non-dependent bases? So far as I can tell, these are all dependent.

http://reviews.llvm.org/D7173

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list