[PATCH] D20500: [ms] Allow more unqualified lookup of types in dependent base classes

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Mon May 23 11:00:06 PDT 2016


rnk marked an inline comment as done.

================
Comment at: lib/Parse/ParseDecl.cpp:2282
@@ -2281,3 +2281,3 @@
 
   // Otherwise, if we don't consume this token, we are going to emit an
   // error anyway.  Try to recover from various common problems.  Check
----------------
rsmith wrote:
> Maybe put the check here instead. That way, you can apply it for any DSContext.
Done. With that change, we ended up over-accepting invalid C++ like this:
  template <typename T>
  struct A : T {
    C c; // MSVC rejects, C is undeclared. My patch accepted invalid.
  };
  struct B { typedef int C; };
  template struct A<B>;

This recovery mode should only be firing inside *methods* of classes with dependent bases, so I tweaked ActOnMSVCUnknownType to do that.


http://reviews.llvm.org/D20500





More information about the cfe-commits mailing list