Skip to content

Commit abedbaf

Browse files
committed
Modified version
1 parent 2b285ec commit abedbaf

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3161,7 +3161,7 @@ def err_musttail_member_mismatch : Error<
31613161
def note_musttail_callee_defined_here : Note<"%0 declared here">;
31623162
def note_tail_call_required : Note<"tail call required by %0 attribute here">;
31633163
def err_musttail_mismatch : Error<
3164-
"cannot perform a tail call to function %select{| %1}0 because its signature "
3164+
"cannot perform a tail call to function%select{| %1}0 because its signature "
31653165
"is incompatible with the calling function">;
31663166
def note_musttail_mismatch : Note<
31673167
"target function "

clang/lib/Sema/SemaStmt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) {
719719

720720
if (const FunctionDecl *CalleeDecl = CE->getDirectCallee();
721721
CalleeDecl && CalleeDecl->hasAttr<NotTailCalledAttr>()) {
722-
Diag(St->getBeginLoc(), diag::err_musttail_mismatch) << &MTA;
722+
Diag(St->getBeginLoc(), diag::err_musttail_mismatch) << CalleeDecl;
723723
return false;
724724
}
725725

clang/test/Sema/attr-musttail.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ int __attribute__((not_tail_called)) foo1(int a) {
77

88
int foo2(int a) {
99
[[clang::musttail]]
10-
return foo1(a); // expected-error{{cannot perform a tail call to function 'musttail' because its signature is incompatible with the calling function}}
10+
return foo1(a); // expected-error{{cannot perform a tail call to function'foo1' because its signature is incompatible with the calling function}}
1111
}
1212

1313
int main() {

0 commit comments

Comments
 (0)