* imported qemu/hotfix-glibc-2.41.patch
[t2sde.git] / package / develop / clang / naked-non-asm.patch
blob1b27c9c6070f86d91b3653101bcb678dfad9fb8f
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/clang/naked-non-asm.patch
3 # Copyright (C) 2019 - 2022 The T2 SDE Project
4 #
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7 #
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 --- cfe-9.0.0.src/include/clang/Basic/DiagnosticSemaKinds.td.vanilla 2019-10-03 17:16:15.368000000 +0200
15 +++ cfe-9.0.0.src/include/clang/Basic/DiagnosticSemaKinds.td 2019-10-03 17:17:31.392000000 +0200
16 @@ -8669,7 +8669,7 @@
17 def err_filter_expression_integral : Error<
18 "filter expression type should be an integral value not %0">;
20 -def err_non_asm_stmt_in_naked_function : Error<
21 +def warn_non_asm_stmt_in_naked_function : Warning<
22 "non-ASM statement in naked function is not supported">;
23 def err_asm_naked_this_ref : Error<
24 "'this' pointer references not allowed in naked functions">;
25 --- clang-14.0.0.src/lib/Sema/SemaDecl.cpp.vanilla 2022-03-25 23:48:45.430955299 +0100
26 +++ clang-14.0.0.src/lib/Sema/SemaDecl.cpp 2022-03-25 23:49:28.535957523 +0100
27 @@ -14964,10 +14964,10 @@
28 if (RegisterVariables)
29 continue;
30 if (!isa<AsmStmt>(S) && !isa<NullStmt>(S)) {
31 - Diag(S->getBeginLoc(), diag::err_non_asm_stmt_in_naked_function);
32 + Diag(S->getBeginLoc(), diag::warn_non_asm_stmt_in_naked_function);
33 Diag(FD->getAttr<NakedAttr>()->getLocation(), diag::note_attribute);
34 - FD->setInvalidDecl();
35 - break;
36 + //FD->setInvalidDecl();
37 + //break;