In http://reviews.llvm.org/D10935#199903, @thakis wrote:

> Maybe the "; overrides of 'f' in subclasses are not available in the 
> constructor of 'A'" should just be omitted in this case? (This is probably up 
> to Richard.)


Maybe add a note "qualified call to 'A::f' is treated as a virtual call to 'f' 
due to -fapple-kext"?

(Also, how about adding "has undefined behavior" before the semicolon in the 
warning?)

I also wonder if we should add an `performsVirtualDispatch(const LangOptions 
&)` to `MemberExpr`, instead of the somewhat more opaque check for a qualifier 
here. (There are other places where we perform a similar check, such as 
`MarkExprReferenced` and `Sema::MarkMemberReferenced`, which get the kext case 
wrong.)


================
Comment at: lib/Sema/SemaOverload.cpp:11796
@@ +11795,3 @@
+    if (isa<CXXThisExpr>(MemExpr->getBase()->IgnoreParenCasts()) &&
+       (getLangOpts().AppleKext || !MemExpr->getQualifier())) {
+      Diag(MemExpr->getLocStart(),
----------------
Use `hasQualifier` instead of `getQualifier`.


http://reviews.llvm.org/D10935




_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to