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