[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 14 09:46:17 PDT 2025
================
@@ -717,6 +717,12 @@ bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) {
return false;
}
+ if (const FunctionDecl *CalleeDecl = CE->getDirectCallee();
+ CalleeDecl && CalleeDecl->hasAttr<NotTailCalledAttr>()) {
+ Diag(St->getBeginLoc(), diag::err_musttail_mismatch) << true << CalleeDecl;
+ return false;
----------------
erichkeane wrote:
Yep, exactly :/ Commented mostly so that someone someday might come along and do the work to figure out what is going on here :)
https://github.com/llvm/llvm-project/pull/134465
More information about the cfe-commits
mailing list