aaron.ballman added inline comments.

================
Comment at: lib/Sema/SemaDecl.cpp:5374
@@ +5373,3 @@
+
+  // Virtual functions cannot be marked as 'notail'.
+  if (auto *Attr = ND.getAttr<NotTailCalledAttr>())
----------------
I am not home yet, and so I don't have the source code to try this out, but I 
have a sneaking suspicion there's a way to tell whether a function is an 
override. IIRC, it's something like overridden_methods() on a CXXMethodDecl.

I will do some poking when I am back in front of the source. Otherwise, I would 
guess you can look at some of the diagnostics in DiagnosticSemaKinds.td for the 
override keyword itself, because I bet we warn when you specify override on 
something that isn't a virtual function override, and that should have a code 
example.


http://reviews.llvm.org/D12922



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

Reply via email to