[PATCH] Implementation of core DR580 and C++11 member access rules

Richard Smith richard at metafoo.co.uk
Sat Apr 20 05:29:46 PDT 2013



================
Comment at: lib/Sema/SemaAccess.cpp:1490
@@ -1491,1 +1489,3 @@
+  } else if (TemplateDecl *TD = dyn_cast<TemplateDecl>(D)) {
+    DC = dyn_cast<DeclContext>(TD->getTemplatedDecl());
   }
----------------
This should either be cast<DeclContext> or should not assign to DC if the templated decl is not a DeclContext (that is, if it's an alias template). I think we shouldn't get here for alias templates, so the cast<> is probably the right option; please add some testcases for that.


http://llvm-reviews.chandlerc.com/D696



More information about the cfe-commits mailing list