Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0fd4496

Browse files
authored
Merge pull request#872 from github/michaelrfairhurst/final-misra-c-rule-amendments
Implement final MISRA C 2023 rule amendments
2 parents1ead46d +a03892c commit0fd4496

15 files changed

+302
-32
lines changed

‎amendments.csv

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
language,standard,amendment,rule_id,supportable,implementation_category,implemented,difficulty
22
c,MISRA-C-2012,Amendment3,DIR-4-6,Yes,Expand,Yes,Easy
3-
c,MISRA-C-2012,Amendment3,DIR-4-9,Yes,Refine,No,Easy
3+
c,MISRA-C-2012,Amendment3,DIR-4-9,Yes,Refine,Yes,Easy
44
c,MISRA-C-2012,Amendment3,DIR-4-11,Yes,Refine,No,Import
5-
c,MISRA-C-2012,Amendment3,RULE-1-4,Yes,Replace,No,Easy
5+
c,MISRA-C-2012,Amendment3,RULE-1-4,Yes,Replace,Yes,Easy
66
c,MISRA-C-2012,Amendment3,RULE-10-1,Yes,Replace,Yes,Easy
77
c,MISRA-C-2012,Amendment3,RULE-10-3,Yes,Refine,Yes,Easy
88
c,MISRA-C-2012,Amendment3,RULE-10-4,Yes,Refine,Yes,Import
99
c,MISRA-C-2012,Amendment3,RULE-10-5,Yes,Expand,Yes,Easy
1010
c,MISRA-C-2012,Amendment3,RULE-10-7,Yes,Refine,Yes,Import
1111
c,MISRA-C-2012,Amendment3,RULE-10-8,Yes,Refine,Yes,Import
1212
c,MISRA-C-2012,Amendment3,RULE-21-11,Yes,Clarification,Yes,Import
13-
c,MISRA-C-2012,Amendment3,RULE-21-12,Yes,Replace,No,Easy
13+
c,MISRA-C-2012,Amendment3,RULE-21-12,Yes,Replace,Yes,Easy
1414
c,MISRA-C-2012,Amendment4,RULE-11-3,Yes,Expand,Yes,Easy
1515
c,MISRA-C-2012,Amendment4,RULE-11-8,Yes,Expand,Yes,Easy
1616
c,MISRA-C-2012,Amendment4,RULE-13-2,Yes,Expand,Yes,Very Hard
17-
c,MISRA-C-2012,Amendment4,RULE-18-6,Yes,Expand,No,Medium
17+
c,MISRA-C-2012,Amendment4,RULE-18-6,Yes,Expand,Yes,Medium
1818
c,MISRA-C-2012,Amendment4,RULE-18-8,Yes,Split,Yes,Easy
1919
c,MISRA-C-2012,Amendment4,RULE-2-2,Yes,Clarification,Yes,Import
2020
c,MISRA-C-2012,Amendment4,RULE-2-7,Yes,Clarification,Yes,Import
@@ -26,7 +26,6 @@ c,MISRA-C-2012,Amendment4,RULE-10-1,Yes,Clarification,Yes,Import
2626
c,MISRA-C-2012,Amendment4,RULE-18-3,Yes,Clarification,Yes,Import
2727
c,MISRA-C-2012,Amendment4,RULE-1-4,Yes,Replace,No,Easy
2828
c,MISRA-C-2012,Amendment4,RULE-9-1,Yes,Refine,Yes,Easy
29-
c,MISRA-C-2012,Amendment4,RULE-9-2,Yes,Refine,No,Import
3029
c,MISRA-C-2012,Corrigendum2,DIR-4-10,Yes,Clarification,Yes,Import
3130
c,MISRA-C-2012,Corrigendum2,RULE-7-4,Yes,Refine,Yes,Easy
3231
c,MISRA-C-2012,Corrigendum2,RULE-8-2,Yes,Clarification,Yes,Import
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* @id c/misra/thread-local-object-address-copied-to-global-object
3+
* @name RULE-18-6: The address of an object with thread-local storage shall not be copied to a global object
4+
* @description Storing the address of a thread-local object in a global object will result in
5+
* undefined behavior if the address is accessed after the relevant thread is
6+
* terminated.
7+
* @kind problem
8+
* @precision very-high
9+
* @problem.severity error
10+
* @tags external/misra/id/rule-18-6
11+
* correctness
12+
* external/misra/c/2012/amendment3
13+
* external/misra/obligation/required
14+
*/
15+
16+
import cpp
17+
import codingstandards.c.misra
18+
import codingstandards.c.Objects
19+
import codingstandards.cpp.Concurrency
20+
21+
fromAssignExprassignment,ElementthreadLocal,ObjectIdentitystatic
22+
where
23+
notisExcluded(assignment, Pointers1Package::threadLocalObjectAddressCopiedToGlobalObjectQuery())and
24+
assignment.getLValue()=static.getASubobjectAccess()and
25+
static.getStorageDuration().isStatic()and
26+
(
27+
exists(ObjectIdentitythreadLocalObj|
28+
threadLocal=threadLocalObjand
29+
assignment.getRValue()=threadLocalObj.getASubobjectAddressExpr()and
30+
threadLocalObj.getStorageDuration().isThread()
31+
)
32+
or
33+
exists(TSSGetFunctionCallgetCall|
34+
threadLocal=getCall.getKey()and
35+
assignment.getRValue()=getCall
36+
)
37+
)
38+
selectassignment,"Thread local object $@ address copied to static object $@.",
39+
threadLocal.getLocation(),threadLocal.toString(),static.getLocation(),static.toString()

‎c/misra/src/rules/RULE-21-12/ExceptionHandlingFeaturesOfFenvhUsed.ql

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import codingstandards.c.misra
1818
classFPExceptionHandlingFunctionextendsFunction{
1919
FPExceptionHandlingFunction(){
2020
this.hasName([
21-
"feclearexcept","fegetexceptflag","feraiseexcept","fesetexceptflag","fetestexcept"
21+
"feclearexcept","fegetexceptflag","feraiseexcept","fesetexceptflag","fetestexcept",
22+
"fesetenv","feupdateenv","fesetround"
2223
])and
2324
this.getFile().getBaseName()="fenv.h"
2425
}
@@ -33,22 +34,30 @@ class FPExceptionHandlingMacro extends Macro {
3334
}
3435
}
3536

36-
fromLocatablecall,stringname,stringkind
37+
fromLocatableelement,stringname,stringmessage
3738
where
38-
notisExcluded(call, BannedPackage::exceptionHandlingFeaturesOfFenvhUsedQuery())and
39+
notisExcluded(element, BannedPackage::exceptionHandlingFeaturesOfFenvhUsedQuery())and
3940
(
41+
exists(Includeinclude|
42+
include.getIncludedFile().getBaseName()="fenv.h"and
43+
message="Include of banned header"and
44+
name="fenv.h"and
45+
element=include
46+
)
47+
or
4048
exists(FPExceptionHandlingFunctionf|
41-
call=f.getACallToThisFunction()and
49+
element=f.getACallToThisFunction()and
4250
name=f.getName()and
43-
kind="function"
51+
message="Call to bannedfunction"
4452
)
4553
or
4654
exists(FPExceptionHandlingMacrom|
47-
call=m.getAnInvocation()and
55+
element=m.getAnInvocation()and
4856
name=m.getName()and
49-
kind="macro"and
57+
message="Expansion of bannedmacro"and
5058
// Exclude macro invocations expanded from other macro invocations from macros in fenv.h.
51-
notcall.(MacroInvocation).getParentInvocation().getMacro().getFile().getBaseName()="fenv.h"
59+
notelement.(MacroInvocation).getParentInvocation().getMacro().getFile().getBaseName()=
60+
"fenv.h"
5261
)
5362
)
54-
selectcall,"Call to banned "+kind+""+name+"."
63+
selectelement,message+" '"+name+"'."

‎c/misra/test/rules/DIR-4-9/test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#defineMACRO8(x) "NOP" // COMPLIANT
1111
#defineMACRO9() printf_custom("output = %d", 7) // NON_COMPLIANT
1212
#defineMACRO10(x)// COMPLIANT
13+
#defineMACRO11(x) _Generic((x), int : 1, default : 0) // COMPLIANT
1314
#defineMY_ASSERT(X) assert(X) // NON_COMPLIANT[FALSE_NEGATIVE]
1415

1516
constchara1[MACRO2(1,1)+6];

‎c/misra/test/rules/RULE-1-4/EmergentLanguageFeaturesUsed.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
| test.c:2:1:2:22 | #include <stdatomic.h> | Usage of emergent language feature. |
22
| test.c:4:1:4:20 | #include <threads.h> | Usage of emergent language feature. |
3-
| test.c:6:1:6:49 | #define MACRO(x) _Generic((x), int : 0, long : 1) | Usage of emergent language feature. |
43
| test.c:7:1:7:32 | #define __STDC_WANT_LIB_EXT1__ 1 | Usage of emergent language feature. |
54
| test.c:12:26:12:40 | atomic_new_type | Usage of emergent language feature. |
65
| test.c:17:15:17:15 | i | Usage of emergent language feature. |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| test.c:29:3:29:10 | ... = ... | Thread local object $@ address copied to static object $@. | test.c:8:19:8:20 | test.c:8:19:8:20 | t1 | test.c:12:6:12:7 | test.c:12:6:12:7 | g2 |
2+
| test.c:55:3:55:14 | ... = ... | Thread local object $@ address copied to static object $@. | test.c:10:17:10:18 | test.c:10:17:10:18 | t3 | test.c:13:3:13:4 | test.c:13:3:13:4 | g3 |
3+
| test.c:152:3:152:21 | ... = ... | Thread local object $@ address copied to static object $@. | test.c:152:16:152:20 | test.c:152:16:152:20 | & ... | test.c:12:6:12:7 | test.c:12:6:12:7 | g2 |
4+
| test.c:155:3:155:23 | ... = ... | Thread local object $@ address copied to static object $@. | test.c:155:18:155:22 | test.c:155:18:155:22 | & ... | test.c:13:3:13:4 | test.c:13:3:13:4 | g3 |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rules/RULE-18-6/ThreadLocalObjectAddressCopiedToGlobalObject.ql

‎c/misra/test/rules/RULE-18-6/test.c

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
#include<threads.h>
2+
3+
typedefstruct {
4+
int*p;
5+
intm
6+
}s;
7+
8+
_Thread_localintt1;
9+
_Thread_localint*t2;
10+
_Thread_localst3;
11+
intg1;
12+
int*g2;
13+
sg3;
14+
15+
voidf1() {
16+
// Regular object accesses
17+
t1=t1;// COMPLIANT
18+
t1=*t2;// COMPLIANT
19+
t1=g1;// COMPLIANT
20+
t1=*g2;// COMPLIANT
21+
g1=t1;// COMPLIANT
22+
g1=*t2;// COMPLIANT
23+
g1=g1;// COMPLIANT
24+
g1=*g2;// COMPLIANT
25+
t2=&t1;// COMPLIANT
26+
t2=t2;// COMPLIANT
27+
t2=&g1;// COMPLIANT
28+
t2=g2;// COMPLIANT
29+
g2=&t1;// NON-COMPLIANT
30+
g2=t2;// COMPLIANT
31+
g2=&g1;// COMPLIANT
32+
g2=g2;// COMPLIANT
33+
*t2=t1;// COMPLIANT
34+
*t2=*t2;// COMPLIANT
35+
*t2=g1;// COMPLIANT
36+
*t2=*g2;// COMPLIANT
37+
*g2=t1;// COMPLIANT
38+
*g2=*t2;// COMPLIANT
39+
*g2=g1;// COMPLIANT
40+
*g2=*g2;// COMPLIANT
41+
42+
// Subobject accesses
43+
t3.m=t3.m;// COMPLIANT
44+
t3.m=*t3.p;// COMPLIANT
45+
t3.m=g3.m;// COMPLIANT
46+
t3.m=*g3.p;// COMPLIANT
47+
g3.m=t3.m;// COMPLIANT
48+
g3.m=*t3.p;// COMPLIANT
49+
g3.m=g3.m;// COMPLIANT
50+
g3.m=*g3.p;// COMPLIANT
51+
t3.p=&t3.m;// COMPLIANT
52+
t3.p=t3.p;// COMPLIANT
53+
t3.p=&g3.m;// COMPLIANT
54+
t3.p=g3.p;// COMPLIANT
55+
g3.p=&t3.m;// NON-COMPLIANT
56+
g3.p=t3.p;// COMPLIANT
57+
g3.p=&g3.m;// COMPLIANT
58+
g3.p=g3.p;// COMPLIANT
59+
*t3.p=t3.m;// COMPLIANT
60+
*t3.p=*t3.p;// COMPLIANT
61+
*t3.p=g3.m;// COMPLIANT
62+
*t3.p=*g3.p;// COMPLIANT
63+
*g3.p=t3.m;// COMPLIANT
64+
*g3.p=*t3.p;// COMPLIANT
65+
*g3.p=g3.m;// COMPLIANT
66+
*g3.p=*g3.p;// COMPLIANT
67+
68+
// Storing values in locals (automatic storage duration)
69+
intl1;
70+
int*l2;
71+
sl3;
72+
73+
l1=l1;// COMPLIANT
74+
l1=*l2;// COMPLIANT
75+
l1=l3.m;// COMPLIANT
76+
l1=*l3.p;// COMPLIANT
77+
l1=t1;// COMPLIANT
78+
l1=*t2;// COMPLIANT
79+
l1=t3.m;// COMPLIANT
80+
l1=*t3.p;// COMPLIANT
81+
l1=g1;// COMPLIANT
82+
l1=*g2;// COMPLIANT
83+
l1=g3.m;// COMPLIANT
84+
l1=*g3.p;// COMPLIANT
85+
l2=&l1;// COMPLIANT
86+
l2=l2;// COMPLIANT
87+
l2=&l3.m;// COMPLIANT
88+
l2=l3.p;// COMPLIANT
89+
l2=&t1;// COMPLIANT
90+
l2=t2;// COMPLIANT
91+
l2=&t3.m;// COMPLIANT
92+
l2=t3.p;// COMPLIANT
93+
l2=&g1;// COMPLIANT
94+
l2=g2;// COMPLIANT
95+
l2=&g3.m;// COMPLIANT
96+
l2=g3.p;// COMPLIANT
97+
*l2=l1;// COMPLIANT
98+
*l2=*l2;// COMPLIANT
99+
*l2=l3.m;// COMPLIANT
100+
*l2=*l3.p;// COMPLIANT
101+
*l2=t1;// COMPLIANT
102+
*l2=*t2;// COMPLIANT
103+
*l2=t3.m;// COMPLIANT
104+
*l2=*t3.p;// COMPLIANT
105+
*l2=g1;// COMPLIANT
106+
*l2=*g2;// COMPLIANT
107+
*l2=g3.m;// COMPLIANT
108+
*l2=*g3.p;// COMPLIANT
109+
l3.m=l1;// COMPLIANT
110+
l3.m=*l2;// COMPLIANT
111+
l3.m=l3.m;// COMPLIANT
112+
l3.m=*l3.p;// COMPLIANT
113+
l3.m=t1;// COMPLIANT
114+
l3.m=*t2;// COMPLIANT
115+
l3.m=t3.m;// COMPLIANT
116+
l3.m=*t3.p;// COMPLIANT
117+
l3.m=g1;// COMPLIANT
118+
l3.m=*g2;// COMPLIANT
119+
l3.m=g3.m;// COMPLIANT
120+
l3.m=*g3.p;// COMPLIANT
121+
l3.p=&l1;// COMPLIANT
122+
l3.p=l2;// COMPLIANT
123+
l3.p=&l3.m;// COMPLIANT
124+
l3.p=l3.p;// COMPLIANT
125+
l3.p=&t1;// COMPLIANT
126+
l3.p=t2;// COMPLIANT
127+
l3.p=&t3.m;// COMPLIANT
128+
l3.p=t3.p;// COMPLIANT
129+
l3.p=&g1;// COMPLIANT
130+
l3.p=g2;// COMPLIANT
131+
l3.p=&g3.m;// COMPLIANT
132+
l3.p=g3.p;// COMPLIANT
133+
*l3.p=l1;// COMPLIANT
134+
*l3.p=*l2;// COMPLIANT
135+
*l3.p=l3.m;// COMPLIANT
136+
*l3.p=*l3.p;// COMPLIANT
137+
*l3.p=t1;// COMPLIANT
138+
*l3.p=*t2;// COMPLIANT
139+
*l3.p=t3.m;// COMPLIANT
140+
*l3.p=*t3.p;// COMPLIANT
141+
*l3.p=g1;// COMPLIANT
142+
*l3.p=*g2;// COMPLIANT
143+
*l3.p=g3.m;// COMPLIANT
144+
*l3.p=*g3.p;// COMPLIANT
145+
146+
// Storing local values in globals is covered by the shared query.
147+
}
148+
149+
tss_ttss1;
150+
voidf2() {
151+
g1=*(int*)tss_get(&tss1);// COMPLIANT
152+
g2=tss_get(&tss1);// NON-COMPLIANT
153+
*g2=*(int*)tss_get(&tss1);// COMPLIANT
154+
g3.m=*(int*)tss_get(&tss1);// COMPLIANT
155+
g3.p=tss_get(&tss1);// NON-COMPLIANT
156+
*g3.p=*(int*)tss_get(&tss1);// COMPLIANT
157+
g1= ((s*)tss_get(&tss1))->m;// COMPLIANT
158+
g1=*((s*)tss_get(&tss1))->p;// COMPLIANT
159+
g2=&((s*)tss_get(&tss1))->m;// NON-COMPLIANT[false negative]
160+
g2=*((s*)tss_get(&tss1))->p;// COMPLIANT
161+
*g2= ((s*)tss_get(&tss1))->m;// COMPLIANT
162+
*g2=*((s*)tss_get(&tss1))->p;// COMPLIANT
163+
g3.m= ((s*)tss_get(&tss1))->m;// COMPLIANT
164+
g3.m=*((s*)tss_get(&tss1))->p;// COMPLIANT
165+
g3.p=&((s*)tss_get(&tss1))->m;// NON-COMPLIANT[false negative]
166+
g3.p=*((s*)tss_get(&tss1))->p;// COMPLIANT
167+
*g3.p= ((s*)tss_get(&tss1))->m;// COMPLIANT
168+
*g3.p=*((s*)tss_get(&tss1))->p;// COMPLIANT
169+
}
Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
| test.c:4:11:4:23 | call to feclearexcept | Call to banned function feclearexcept. |
2-
| test.c:4:25:4:34 | FE_INVALID | Call to banned macro FE_INVALID. |
3-
| test.c:6:3:6:17 | call to fegetexceptflag | Call to banned function fegetexceptflag. |
4-
| test.c:6:24:6:36 | FE_ALL_EXCEPT | Call to banned macro FE_ALL_EXCEPT. |
5-
| test.c:7:3:7:15 | call to feraiseexcept | Call to banned function feraiseexcept. |
6-
| test.c:7:17:7:28 | FE_DIVBYZERO | Call to banned macro FE_DIVBYZERO. |
7-
| test.c:8:3:8:15 | call to feraiseexcept | Call to banned function feraiseexcept. |
8-
| test.c:8:17:8:27 | FE_OVERFLOW | Call to banned macro FE_OVERFLOW. |
9-
| test.c:9:3:9:17 | call to fesetexceptflag | Call to banned function fesetexceptflag. |
10-
| test.c:9:24:9:36 | FE_ALL_EXCEPT | Call to banned macro FE_ALL_EXCEPT. |
11-
| test.c:10:3:10:14 | call to fetestexcept | Call to banned function fetestexcept. |
12-
| test.c:10:16:10:27 | FE_UNDERFLOW | Call to banned macro FE_UNDERFLOW. |
1+
| test.c:2:1:2:17 | #include <fenv.h> | Include of banned header 'fenv.h'. |
2+
| test.c:6:11:6:23 | call to feclearexcept | Call to banned function 'feclearexcept'. |
3+
| test.c:6:25:6:34 | FE_INVALID | Expansion of banned macro 'FE_INVALID'. |
4+
| test.c:8:3:8:17 | call to fegetexceptflag | Call to banned function 'fegetexceptflag'. |
5+
| test.c:8:24:8:36 | FE_ALL_EXCEPT | Expansion of banned macro 'FE_ALL_EXCEPT'. |
6+
| test.c:9:3:9:15 | call to feraiseexcept | Call to banned function 'feraiseexcept'. |
7+
| test.c:9:17:9:28 | FE_DIVBYZERO | Expansion of banned macro 'FE_DIVBYZERO'. |
8+
| test.c:10:3:10:15 | call to feraiseexcept | Call to banned function 'feraiseexcept'. |
9+
| test.c:10:17:10:27 | FE_OVERFLOW | Expansion of banned macro 'FE_OVERFLOW'. |
10+
| test.c:11:3:11:17 | call to fesetexceptflag | Call to banned function 'fesetexceptflag'. |
11+
| test.c:11:24:11:36 | FE_ALL_EXCEPT | Expansion of banned macro 'FE_ALL_EXCEPT'. |
12+
| test.c:12:3:12:14 | call to fetestexcept | Call to banned function 'fetestexcept'. |
13+
| test.c:12:16:12:27 | FE_UNDERFLOW | Expansion of banned macro 'FE_UNDERFLOW'. |
14+
| test.c:15:3:15:10 | call to fesetenv | Call to banned function 'fesetenv'. |
15+
| test.c:16:3:16:13 | call to feupdateenv | Call to banned function 'feupdateenv'. |
16+
| test.c:17:3:17:12 | call to fesetround | Call to banned function 'fesetround'. |

‎c/misra/test/rules/RULE-21-12/test.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
// NON_COMPLIANT: Cannot #include fenv.h.
12
#include<fenv.h>
3+
24
voidf2();
35
voidf1() {
46
inti=feclearexcept(FE_INVALID);// NON_COMPLIANT
@@ -8,5 +10,10 @@ void f1() {
810
feraiseexcept(FE_OVERFLOW);// NON_COMPLIANT
911
fesetexceptflag(&i2,FE_ALL_EXCEPT);// NON_COMPLIANT
1012
fetestexcept(FE_UNDERFLOW);// NON_COMPLIANT
11-
f2();// COMPLIANT
13+
fenv_tenv;
14+
fegetenv(&env);
15+
fesetenv(&env);// NON_COMPLIANT
16+
feupdateenv(&env);// NON_COMPLIANT
17+
fesetround(0);// NON_COMPLIANT
18+
f2();// COMPLIANT
1219
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-`DIR-4-9` -`FunctionOverFunctionLikeMacro.ql`:
2+
- Macros with`_Generic` now no longer reported.
3+
-`RULE-1-4` -`EmergentLanguageFeaturesUsed.ql`:
4+
- Ban on usage of`_Generics` removed.
5+
-`RULE-18-6` -`ThreadLocalObjectAddressCopiedToGlobalObject.ql`:
6+
- New query added to detect thread local objects assigned to static storage duration objects.
7+
-`RULE-21-12` -`ExceptionHandlingFeaturesOfFenvhUsed.ql`:
8+
- Added reports for`#include`ing "fenv.h", and for using`fesetenv`,`feupdatenv`, and`fesetround`.
9+
- Report message altered to handle new cases.

‎cpp/common/src/codingstandards/cpp/Emergent.qll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,4 @@ module C11 {
3030
getBody()="1"
3131
}
3232
}
33-
34-
classGenericMacroextendsEmergentLanguageFeature,Macro{
35-
GenericMacro(){getBody().indexOf("_Generic")=0}
36-
}
3733
}

‎cpp/common/src/codingstandards/cpp/IrreplaceableFunctionLikeMacro.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,7 @@ private class FunctionLikeMacroWithOperatorArgument extends IrreplaceableFunctio
5656
)
5757
}
5858
}
59+
60+
privateclassGenericMacroextendsIrreplaceableFunctionLikeMacro{
61+
GenericMacro(){getBody().matches("%_Generic%")}
62+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp