You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the diagnostic behavior of [[noreturn]] in C2x
Post-commit review feedback suggested dropping the deprecated
diagnostic for the 'noreturn' macro (the diagnostic from the header
file suffices and the macro diagnostic could be confusing) and to only
issue the deprecated diagnostic for [[_Noreturn]] when the attribute
identifier is either directly written or not from a system macro.
Amends the commit made in 5029dce.
Copy file name to clipboardExpand all lines: clang/test/Sema/c2x-noreturn.c
+15-14Lines changed: 15 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -36,29 +36,30 @@ _Noreturn void func1(void); // ok, using the function specifier
36
36
[[_Noreturn]] voidfunc3(void); // all-warning {{the '[[_Noreturn]]' attribute spelling is deprecated in C2x; use '[[noreturn]]' instead}}
37
37
38
38
// Test the behavior of including <stdnoreturn.h>
39
-
#include<stdnoreturn.h>// [email protected]:* {{the '<stdnoreturn.h>' header is deprecated in C2x}}
39
+
#include<stdnoreturn.h>// [email protected]:* {{the '<stdnoreturn.h>' header is deprecated in C2x; either use the '_Noreturn' keyword or the '[[noreturn]]' attribute}}
40
40
41
-
[[noreturn]] voidfunc6(void); // all-warning {{the '[[_Noreturn]]' attribute spelling is deprecated in C2x; use '[[noreturn]]' instead}} \
42
-
// c2x-warning {{macro 'noreturn' has been marked as deprecated}} \
0 commit comments