rsmith added inline comments.

================
Comment at: lib/AST/Expr.cpp:1425
@@ +1424,3 @@
+
+  if (E->isTypeDependent() && isa<CXXThisExpr>(base)) {
+    bool MemberOfCurrentInstantiation = true;
----------------
The language rule for this says nothing about the base being a `this` 
expression; there are many other ways in which a `MemberExpr` could name a 
member of the current instantiation.

In general, the base expression should have (pointer to) `RecordType` or 
`InjectedClassNameType` as its type (that is, `getAsCXXRecordDecl()` should 
succeed) in all cases except when the member access denotes a member of an 
unknown specialization.

================
Comment at: lib/AST/Expr.cpp:1454
@@ +1453,3 @@
+    if (MemberOfCurrentInstantiation && 
!memberdecl->getType()->isDependentType())
+      E->setTypeDependent(false);
+  }
----------------
Please assert that `ty` is not a dependent type here.


https://reviews.llvm.org/D22476



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to