# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/clang/naked-non-asm.patch # Copyright (C) 2019 - 2022 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- --- cfe-9.0.0.src/include/clang/Basic/DiagnosticSemaKinds.td.vanilla 2019-10-03 17:16:15.368000000 +0200 +++ cfe-9.0.0.src/include/clang/Basic/DiagnosticSemaKinds.td 2019-10-03 17:17:31.392000000 +0200 @@ -8669,7 +8669,7 @@ def err_filter_expression_integral : Error< "filter expression type should be an integral value not %0">; -def err_non_asm_stmt_in_naked_function : Error< +def warn_non_asm_stmt_in_naked_function : Warning< "non-ASM statement in naked function is not supported">; def err_asm_naked_this_ref : Error< "'this' pointer references not allowed in naked functions">; --- clang-14.0.0.src/lib/Sema/SemaDecl.cpp.vanilla 2022-03-25 23:48:45.430955299 +0100 +++ clang-14.0.0.src/lib/Sema/SemaDecl.cpp 2022-03-25 23:49:28.535957523 +0100 @@ -14964,10 +14964,10 @@ if (RegisterVariables) continue; if (!isa(S) && !isa(S)) { - Diag(S->getBeginLoc(), diag::err_non_asm_stmt_in_naked_function); + Diag(S->getBeginLoc(), diag::warn_non_asm_stmt_in_naked_function); Diag(FD->getAttr()->getLocation(), diag::note_attribute); - FD->setInvalidDecl(); - break; + //FD->setInvalidDecl(); + //break; } } }