Skip to content

Commit ed381ef

Browse files
authored
Merge branch 'main' into mabluda/fix576
2 parents f154426 + a1a5cab commit ed381ef

File tree

761 files changed

+8629
-1587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

761 files changed

+8629
-1587
lines changed
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: 🤖 Run Matrix Check
1+
name: 🤖 Run Matrix Check
22

33
on:
44
pull_request_target:
5-
types: [synchronize,opened]
5+
types: [synchronize, opened]
66
branches:
77
- "matrix/**"
88
workflow_dispatch:
@@ -11,29 +11,27 @@ jobs:
1111
dispatch-matrix-check:
1212
runs-on: ubuntu-22.04
1313
steps:
14-
1514
- name: Test Variables
1615
shell: pwsh
1716
run: |
18-
Write-Host "Running as: ${{github.actor}}"
19-
17+
Write-Host "Running as: ${{github.actor}}"
18+
2019
- name: Dispatch Matrix Testing Job
21-
if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }}
20+
if: ${{ contains(fromJSON('["mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "nicolaswill"]'), github.actor) }}
2221
uses: peter-evans/repository-dispatch@v2
2322
with:
2423
token: ${{ secrets.RELEASE_ENGINEERING_TOKEN }}
2524
repository: github/codeql-coding-standards-release-engineering
2625
event-type: matrix-test
27-
client-payload: '{"pr": "${{ github.event.number }}"}'
28-
26+
client-payload: '{"pr": "${{ github.event.number }}"}'
2927

3028
- uses: actions/github-script@v6
31-
if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }}
29+
if: ${{ contains(fromJSON('["mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "nicolaswill"]'), github.actor) }}
3230
with:
3331
script: |
3432
github.rest.issues.createComment({
3533
issue_number: context.issue.number,
3634
owner: context.repo.owner,
3735
repo: context.repo.repo,
3836
body: '🤖 Beep Boop! Matrix Testing for this PR has been initiated. Please check back later for results. <br><br> :bulb: If you do not hear back from me please check my status! **I will report even if this PR does not contain files eligible for matrix testing.**'
39-
})
37+
})

.github/workflows/dispatch-matrix-test-on-comment.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,23 @@ on:
88
- "rc/**"
99
- next
1010

11-
1211
jobs:
1312
dispatch-matrix-check:
1413
runs-on: ubuntu-22.04
1514
steps:
16-
1715
- name: Test Variables
1816
shell: pwsh
1917
run: |
2018
Write-Host "Running as: ${{github.actor}}"
2119
2220
$actor = "${{github.actor}}"
2321
24-
$acl = @("jsinglet","mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine")
22+
$acl = @("mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "nicolaswill")
2523
2624
if(-not ($actor -in $acl)){
2725
throw "Refusing to run workflow for user not in acl."
2826
}
2927
30-
3128
- name: Dispatch Matrix Testing Job
3229
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-matrix') }}
3330
uses: peter-evans/repository-dispatch@v2

.github/workflows/dispatch-release-performance-check.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@ jobs:
1212
dispatch-matrix-check:
1313
runs-on: ubuntu-22.04
1414
steps:
15-
1615
- name: Test Variables
1716
shell: pwsh
1817
run: |
1918
Write-Host "Running as: ${{github.actor}}"
2019
2120
$actor = "${{github.actor}}"
2221
23-
$acl = @("jsinglet","mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine")
22+
$acl = @("mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "nicolaswill")
2423
2524
if(-not ($actor -in $acl)){
2625
throw "Refusing to run workflow for user not in acl."
@@ -33,8 +32,7 @@ jobs:
3332
token: ${{ secrets.RELEASE_ENGINEERING_TOKEN }}
3433
repository: github/codeql-coding-standards-release-engineering
3534
event-type: performance-test
36-
client-payload: '{"pr": "${{ github.event.issue.number }}"}'
37-
35+
client-payload: '{"pr": "${{ github.event.issue.number }}"}'
3836

3937
- uses: actions/github-script@v6
4038
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-performance') }}
@@ -45,4 +43,4 @@ jobs:
4543
owner: context.repo.owner,
4644
repo: context.repo.repo,
4745
body: '🏁 Beep Boop! Performance testing for this PR has been initiated. Please check back later for results. Note that the query package generation step must complete before testing will start so it might be a minute. <br><br> :bulb: If you do not hear back from me please check my status! **I will report even if I fail!**'
48-
})
46+
})

c/cert/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/cert-c-coding-standards
2-
version: 2.33.0-dev
2+
version: 2.34.0-dev
33
description: CERT C 2016
44
suites: codeql-suites
55
license: MIT

c/cert/src/rules/INT30-C/UnsignedIntegerOperationsWrapAround.ql

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,11 @@
1515

1616
import cpp
1717
import codingstandards.c.cert
18-
import codingstandards.cpp.Overflow
19-
import semmle.code.cpp.controlflow.Guards
20-
import semmle.code.cpp.valuenumbering.GlobalValueNumbering
18+
import codingstandards.cpp.rules.unsignedoperationwithconstantoperandswraps.UnsignedOperationWithConstantOperandsWraps
2119

22-
from InterestingOverflowingOperation op
23-
where
24-
not isExcluded(op, IntegerOverflowPackage::unsignedIntegerOperationsWrapAroundQuery()) and
25-
op.getType().getUnderlyingType().(IntegralType).isUnsigned() and
26-
// Not within a guard condition
27-
not exists(GuardCondition gc | gc.getAChild*() = op) and
28-
// Not guarded by a check, where the check is not an invalid overflow check
29-
not op.hasValidPreCheck() and
30-
// Is not checked after the operation
31-
not op.hasValidPostCheck() and
32-
// Permitted by exception 3
33-
not op instanceof LShiftExpr and
34-
// Permitted by exception 2 - zero case is handled in separate query
35-
not op instanceof DivExpr and
36-
not op instanceof RemExpr
37-
select op,
38-
"Operation " + op.getOperator() + " of type " + op.getType().getUnderlyingType() + " may wrap."
20+
class UnsignedIntegerOperationsWrapAroundQuery extends UnsignedOperationWithConstantOperandsWrapsSharedQuery
21+
{
22+
UnsignedIntegerOperationsWrapAroundQuery() {
23+
this = IntegerOverflowPackage::unsignedIntegerOperationsWrapAroundQuery()
24+
}
25+
}

c/cert/src/rules/PRE32-C/MacroOrFunctionArgsContainHashToken.ql

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,38 @@ predicate isFunctionSuccessorLocation(ControlFlowNode node, File f, int endline)
3232
PreprocessorDirective isLocatedInAFunctionInvocation(FunctionCall c) {
3333
exists(PreprocessorDirective p, File f, int startCall, int endCall |
3434
isFunctionInvocationLocation(c, f, startCall, endCall) and
35-
exists(int startLine, int endLine | isPreprocDirectiveLine(p, f, startLine, endLine) |
36-
startCall < startLine and
37-
startCall < endLine and
38-
endLine <= endCall and
39-
endLine <= endCall
35+
exists(Expr arg, int preprocStartLine, int preprocEndLine |
36+
c.getAnArgument() = arg and
37+
isPreprocDirectiveLine(p, f, preprocStartLine, preprocEndLine) and
38+
// function call begins before preprocessor directive
39+
startCall < preprocStartLine and
40+
(
41+
// argument's location is after the preprocessor directive
42+
arg.getLocation().getStartLine() > preprocStartLine
43+
or
44+
// arg's location is before an endif token that is part of a
45+
// preprocessor directive defined before the argument.
46+
// E.g.
47+
// memcpy(dest, src,
48+
// #ifdef SOMEMACRO
49+
// 12
50+
// #else
51+
// 24 // 'arg' exists here
52+
// #endif // endif after 'arg', but part of a preproc. branch before 'arg'
53+
// );
54+
p instanceof PreprocessorEndif and
55+
// exists a preprocessor branch of which this is the endif
56+
// and that preprocessor directive exists before
57+
// the argument and after the function call begins.
58+
exists(PreprocessorBranchDirective another |
59+
another.getEndIf() = p and
60+
another.getLocation().getFile() = f and
61+
startCall < another.getLocation().getStartLine() and
62+
arg.getLocation().getStartLine() > another.getLocation().getStartLine()
63+
)
64+
) and
65+
// function call ends after preprocessor directive
66+
endCall > preprocEndLine
4067
) and
4168
result = p
4269
)

c/cert/test/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/cert-c-coding-standards-tests
2-
version: 2.33.0-dev
2+
version: 2.34.0-dev
33
extractor: cpp
44
license: MIT
55
dependencies:

c/cert/test/rules/INT30-C/UnsignedIntegerOperationsWrapAround.expected

Lines changed: 0 additions & 4 deletions
This file was deleted.

c/cert/test/rules/INT30-C/UnsignedIntegerOperationsWrapAround.qlref

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
c/common/test/rules/unsignedoperationwithconstantoperandswraps/UnsignedOperationWithConstantOperandsWraps.ql
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cpp/common/test/rules/donotuserandforgeneratingpseudorandomnumbers/DoNotUseRandForGeneratingPseudorandomNumbers.ql
1+
c/common/test/rules/donotuserandforgeneratingpseudorandomnumbers/DoNotUseRandForGeneratingPseudorandomNumbers.ql

c/cert/test/rules/PRE32-C/MacroOrFunctionArgsContainHashToken.expected

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@
44
| test.c:20:1:20:16 | #ifdef SOMEMACRO | Invocation of function memcpy includes a token "#ifdef SOMEMACRO" that could be confused for an argument preprocessor directive. |
55
| test.c:22:1:22:5 | #else | Invocation of function memcpy includes a token "#else" that could be confused for an argument preprocessor directive. |
66
| test.c:24:1:24:6 | #endif | Invocation of function memcpy includes a token "#endif" that could be confused for an argument preprocessor directive. |
7-
| test.c:27:1:27:8 | #if TEST | Invocation of function memcpy includes a token "#if TEST" that could be confused for an argument preprocessor directive. |
8-
| test.c:28:1:28:6 | #endif | Invocation of function memcpy includes a token "#endif" that could be confused for an argument preprocessor directive. |

c/cert/test/rules/PRE32-C/test.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ void func(const char *src) {
2424
#endif // NON_COMPLIANT
2525
);
2626

27-
#if TEST // COMPLIANT[FALSE_POSITIVE]
28-
#endif // COMPLIANT[FALSE_POSITIVE]
29-
}
27+
#if TEST // COMPLIANT
28+
#endif // COMPLIANT
29+
}

c/common/src/codingstandards/c/Literals.qll

Lines changed: 0 additions & 4 deletions
This file was deleted.

c/common/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/common-c-coding-standards
2-
version: 2.33.0-dev
2+
version: 2.34.0-dev
33
license: MIT
44
dependencies:
55
codeql/common-cpp-coding-standards: '*'

c/common/test/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/common-c-coding-standards-tests
2-
version: 2.33.0-dev
2+
version: 2.34.0-dev
33
extractor: cpp
44
license: MIT
55
dependencies:
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| test.c:4:1:4:41 | #define BAD_MACRO_WITH_ARG(x) (x) + wow ## x | Macro BAD_MACRO_WITH_ARG contains use of parameter x used in multiple contexts. |
2-
| test.c:5:1:5:48 | #define BAD_MACRO_WITH_ARG_TWO(x,y) (x) + wow ## x | Macro BAD_MACRO_WITH_ARG_TWO contains use of parameter x used in multiple contexts. |
1+
| test.c:5:1:5:41 | #define BAD_MACRO_WITH_ARG(x) (x) + wow ## x | Macro BAD_MACRO_WITH_ARG contains use of parameter x used in multiple contexts. |
2+
| test.c:6:1:6:48 | #define BAD_MACRO_WITH_ARG_TWO(x,y) (x) + wow ## x | Macro BAD_MACRO_WITH_ARG_TWO contains use of parameter x used in multiple contexts. |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// GENERATED FILE - DO NOT MODIFY
2+
import codingstandards.cpp.rules.amixedusemacroargumentsubjecttoexpansion.AMixedUseMacroArgumentSubjectToExpansion
3+
4+
class TestFileQuery extends AMixedUseMacroArgumentSubjectToExpansionSharedQuery, TestQuery { }
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// NOTICE: THE TEST CASES BELOW ARE ALSO INCLUDED IN THE C++ TEST CASE AND
2+
// CHANGES SHOULD BE REFLECTED THERE AS WELL.
3+
#define GOOD_MACRO_WITH_ARG(X) ((X)*X##_scale) // COMPLIANT
4+
#define MACRO 1
5+
#define BAD_MACRO_WITH_ARG(x) (x) + wow##x // NON_COMPLIANT
6+
#define BAD_MACRO_WITH_ARG_TWO(x, y) (x) + wow##x // NON_COMPLIANT
7+
#define MACROONE(x) #x // COMPLIANT
8+
#define MACROTWO(x) x *x // COMPLIANT
9+
#define MACROTHREE(x) "##\"\"'" + (x) // COMPLIANT
10+
#define FOO(x) #x MACROONE(x) // COMPLIANT - no further arg expansion
11+
12+
void f() {
13+
14+
int x;
15+
int x_scale;
16+
int y;
17+
int wowMACRO = 0;
18+
19+
y = GOOD_MACRO_WITH_ARG(x);
20+
wowMACRO = BAD_MACRO_WITH_ARG(MACRO);
21+
wowMACRO = BAD_MACRO_WITH_ARG_TWO(MACRO, 1);
22+
char s[] = MACROONE(MACRO);
23+
y = MACROTWO(MACRO);
24+
MACROTHREE(MACRO);
25+
FOO(x);
26+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| test.c:8:14:8:17 | call to atof | Call to banned function atof. |
2+
| test.c:9:12:9:15 | call to atoi | Call to banned function atoi. |
3+
| test.c:10:13:10:16 | call to atol | Call to banned function atol. |
4+
| test.c:11:18:11:22 | call to atoll | Call to banned function atoll. |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// GENERATED FILE - DO NOT MODIFY
2+
import codingstandards.cpp.rules.atofatoiatolandatollused.AtofAtoiAtolAndAtollUsed
3+
4+
class TestFileQuery extends AtofAtoiAtolAndAtollUsedSharedQuery, TestQuery { }
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// NOTICE: THE TEST CASES BELOW ARE ALSO INCLUDED IN THE C++ TEST CASE AND
2+
// CHANGES SHOULD BE REFLECTED THERE AS WELL.
3+
#include <float.h>
4+
#include <stdlib.h>
5+
void f2();
6+
void f1() {
7+
char l1[5] = "abcd";
8+
float l2 = atof(l1); // NON_COMLIANT
9+
int l3 = atoi(l1); // NON_COMPLIANT
10+
long l4 = atol(l1); // NON_COMPLIANT
11+
long long l5 = atoll(l1); // NON_COMPLIANT
12+
f2(); // COMPLIANT
13+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| test.c:8:7:8:8 | x1 | Bit-field 'x1' is declared on type 'int'. |
2+
| test.c:12:15:12:16 | x5 | Bit-field 'x5' is declared on type 'signed long'. |
3+
| test.c:14:15:14:16 | x6 | Bit-field 'x6' is declared on type 'signed char'. |
4+
| test.c:16:14:16:15 | x7 | Bit-field 'x7' is declared on type 'Color'. |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// GENERATED FILE - DO NOT MODIFY
2+
import codingstandards.cpp.rules.bitfieldshallhaveanappropriatetype.BitFieldShallHaveAnAppropriateType
3+
4+
class TestFileQuery extends BitFieldShallHaveAnAppropriateTypeSharedQuery, TestQuery { }
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// NOTICE: THE TEST CASES BELOW ARE ALSO INCLUDED IN THE C++ TEST CASE AND
2+
// CHANGES SHOULD BE REFLECTED THERE AS WELL.
3+
typedef unsigned int UINT16;
4+
5+
enum Color { R, G, B };
6+
7+
struct SampleStruct {
8+
int x1 : 2; // NON_COMPLIANT - not explicitly signed or unsigned
9+
unsigned int x2 : 2; // COMPLIANT - explicitly unsigned
10+
signed int x3 : 2; // COMPLIANT - explicitly signed
11+
UINT16 x4 : 2; // COMPLIANT - type alias resolves to a compliant type
12+
signed long x5 : 2; // NON_COMPLIANT - cannot declare bit field for long, even
13+
// if it's signed
14+
signed char x6 : 2; // NON_COMPLIANT - cannot declare bit field for char, even
15+
// if it's signed
16+
enum Color x7 : 3; // NON_COMPLIANT - cannot declare bit field for enum
17+
} sample_struct;
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
problems
2-
| test.c:8:8:8:12 | c_str | test.c:15:16:15:21 | call to getenv | test.c:8:8:8:12 | c_str | The object returned by the function getenv should not be modified. |
3-
| test.c:64:5:64:9 | conv4 | test.c:61:11:61:20 | call to localeconv | test.c:64:5:64:9 | conv4 | The object returned by the function localeconv should not be modified. |
4-
| test.c:73:5:73:8 | conv | test.c:69:25:69:34 | call to localeconv | test.c:73:5:73:8 | conv | The object returned by the function localeconv should not be modified. |
2+
| test.c:11:8:11:12 | c_str | test.c:18:16:18:21 | call to getenv | test.c:11:8:11:12 | c_str | The object returned by the function getenv should not be modified. |
3+
| test.c:67:5:67:9 | conv4 | test.c:64:11:64:20 | call to localeconv | test.c:67:5:67:9 | conv4 | The object returned by the function localeconv should not be modified. |
4+
| test.c:76:5:76:8 | conv | test.c:72:25:72:34 | call to localeconv | test.c:76:5:76:8 | conv | The object returned by the function localeconv should not be modified. |
55
edges
6-
| test.c:5:18:5:22 | c_str | test.c:8:8:8:12 | c_str |
7-
| test.c:15:16:15:21 | call to getenv | test.c:21:9:21:12 | env1 |
8-
| test.c:21:9:21:12 | env1 | test.c:5:18:5:22 | c_str |
9-
| test.c:61:11:61:20 | call to localeconv | test.c:64:5:64:9 | conv4 |
10-
| test.c:69:25:69:34 | call to localeconv | test.c:73:5:73:8 | conv |
6+
| test.c:8:18:8:22 | c_str | test.c:11:8:11:12 | c_str |
7+
| test.c:18:16:18:21 | call to getenv | test.c:24:9:24:12 | env1 |
8+
| test.c:24:9:24:12 | env1 | test.c:8:18:8:22 | c_str |
9+
| test.c:64:11:64:20 | call to localeconv | test.c:67:5:67:9 | conv4 |
10+
| test.c:72:25:72:34 | call to localeconv | test.c:76:5:76:8 | conv |
1111
nodes
12-
| test.c:5:18:5:22 | c_str | semmle.label | c_str |
13-
| test.c:8:8:8:12 | c_str | semmle.label | c_str |
14-
| test.c:15:16:15:21 | call to getenv | semmle.label | call to getenv |
15-
| test.c:21:9:21:12 | env1 | semmle.label | env1 |
16-
| test.c:61:11:61:20 | call to localeconv | semmle.label | call to localeconv |
17-
| test.c:64:5:64:9 | conv4 | semmle.label | conv4 |
18-
| test.c:69:25:69:34 | call to localeconv | semmle.label | call to localeconv |
19-
| test.c:73:5:73:8 | conv | semmle.label | conv |
12+
| test.c:8:18:8:22 | c_str | semmle.label | c_str |
13+
| test.c:11:8:11:12 | c_str | semmle.label | c_str |
14+
| test.c:18:16:18:21 | call to getenv | semmle.label | call to getenv |
15+
| test.c:24:9:24:12 | env1 | semmle.label | env1 |
16+
| test.c:64:11:64:20 | call to localeconv | semmle.label | call to localeconv |
17+
| test.c:67:5:67:9 | conv4 | semmle.label | conv4 |
18+
| test.c:72:25:72:34 | call to localeconv | semmle.label | call to localeconv |
19+
| test.c:76:5:76:8 | conv | semmle.label | conv |
2020
subpaths

c/common/test/rules/constlikereturnvalue/test.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
// NOTICE: THE TEST CASES BELOW ARE ALSO INCLUDED IN THE C++ TEST CASE AND
2+
// CHANGES SHOULD BE REFLECTED THERE AS WELL.
13
#include <locale.h>
4+
#include <stddef.h>
25
#include <stdlib.h>
36
#include <string.h>
47

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
| test.c:8:1:8:25 | #define MACRO4(x) (x + 1) | Macro used instead of a function. |
2+
| test.c:13:1:13:48 | #define MACRO9() printf_custom("output = %d", 7) | Macro used instead of a function. |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// GENERATED FILE - DO NOT MODIFY
2+
import codingstandards.cpp.rules.functionlikemacrosdefined.FunctionLikeMacrosDefined
3+
4+
class TestFileQuery extends FunctionLikeMacrosDefinedSharedQuery, TestQuery { }

0 commit comments

Comments
 (0)