[PATCH] D12922: Add support for function attribute "notail"
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 2 16:39:55 PST 2015
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
More information about the cfe-commits
mailing list