Skip to content

Commit e2590ec

Browse files
committed
Regenerate package files
1 parent b784771 commit e2590ec

File tree

19 files changed

+60
-38
lines changed

19 files changed

+60
-38
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// GENERATED FILE - DO NOT MODIFY
22
import codingstandards.cpp.rules.resultofanassignmentoperatorshouldnotbeused_shared.ResultOfAnAssignmentOperatorShouldNotBeUsed_shared
33

4-
class TestFileQuery extends ResultOfAnAssignmentOperatorShouldNotBeUsed_sharedSharedQuery, TestQuery
5-
{ }
4+
class TestFileQuery extends ResultOfAnAssignmentOperatorShouldNotBeUsed_sharedSharedQuery, TestQuery {
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
| test.c:5:3:5:5 | 10 | Non zero octal literal 012. |
2+
| test.c:6:3:6:5 | 44 | Non zero octal literal 054. |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// GENERATED FILE - DO NOT MODIFY
2+
import codingstandards.cpp.rules.useofnonzerooctalliteral_shared.UseOfNonZeroOctalLiteral_shared
3+
4+
class TestFileQuery extends UseOfNonZeroOctalLiteral_sharedSharedQuery, TestQuery { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +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.
3+
void test_non_zero_octal() {
4+
0; // COMPLIANT - octal literal zero permitted
5+
012; // NON_COMPLIANT
6+
054; // NON_COMPLIANT
7+
}

c/misra/test/rules/RULE-7-1/OctalConstantsUsed.expected

-2
This file was deleted.

c/misra/test/rules/RULE-7-1/OctalConstantsUsed.qlref

-1
This file was deleted.

c/misra/test/rules/RULE-7-1/test.c

-10
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
| test.cpp:3:3:3:8 | 10 | This literal contains the non-zero octal escape code \\012. |
2+
| test.cpp:4:3:4:8 | 44 | This literal contains the non-zero octal escape code \\054. |
3+
| test.cpp:5:3:5:9 | 3129 | This literal contains the non-zero octal escape code \\014. |
4+
| test.cpp:7:3:7:8 | \n | This literal contains the non-zero octal escape code \\012. |
5+
| test.cpp:8:3:8:8 | , | This literal contains the non-zero octal escape code \\054. |
6+
| test.cpp:9:3:9:9 | \u000c9 | This literal contains the non-zero octal escape code \\014. |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rules/M2-13-2/UseOfNonZeroOctalEscape.ql
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
void test_non_zero_octal() {
2+
'\0'; // COMPLIANT - octal zero escape sequence permitted
3+
'\012'; // NON_COMPLIANT
4+
'\054'; // NON_COMPLIANT
5+
'\0149'; // NON_COMPLIANT
6+
"\0"; // COMPLIANT - octal zero escape sequence permitted
7+
"\012"; // NON_COMPLIANT
8+
"\054"; // NON_COMPLIANT
9+
"\0149"; // NON_COMPLIANT
10+
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
#ifndef _GHLIBCPP_CTIME
22
#define _GHLIBCPP_CTIME
3-
#include "time.h"
3+
#include <time.h>
44
namespace std {
5-
5+
using ::clock_t;
6+
using ::clock;
7+
using ::time_t;
8+
using ::time;
9+
using ::tm;
10+
using ::difftime;
11+
using ::asctime;
12+
using ::ctime;
13+
using ::localtime;
14+
using ::gmtime;
15+
using ::mktime;
616
} // namespace std
717
#endif // _GHLIBCPP_CTIME

cpp/common/test/includes/standard-library/time.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef _GHLIBCPP_CTIME
2-
#define _GHLIBCPP_CTIME
1+
#ifndef _GHLIBCPP_TIME
2+
#define _GHLIBCPP_TIME
33

44
typedef unsigned long clock_t;
55
typedef unsigned long time_t;
@@ -29,4 +29,4 @@ struct tm *localtime(const time_t *timer);
2929
size_t strftime(char *ptr, size_t maxsize, const char *format,
3030
const struct tm *timeptr);
3131

32-
#endif
32+
#endif // _GHLIBCPP_TIME
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// GENERATED FILE - DO NOT MODIFY
22
import codingstandards.cpp.rules.definitionnotconsideredforunqualifiedlookup_shared.DefinitionNotConsideredForUnqualifiedLookup_shared
33

4-
class TestFileQuery extends DefinitionNotConsideredForUnqualifiedLookup_sharedSharedQuery, TestQuery
5-
{ }
4+
class TestFileQuery extends DefinitionNotConsideredForUnqualifiedLookup_sharedSharedQuery, TestQuery {
5+
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// GENERATED FILE - DO NOT MODIFY
22
import codingstandards.cpp.rules.hiddeninheritednonoverridablememberfunction_shared.HiddenInheritedNonOverridableMemberFunction_shared
33

4-
class TestFileQuery extends HiddenInheritedNonOverridableMemberFunction_sharedSharedQuery, TestQuery
5-
{ }
4+
class TestFileQuery extends HiddenInheritedNonOverridableMemberFunction_sharedSharedQuery, TestQuery {
5+
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// GENERATED FILE - DO NOT MODIFY
22
import codingstandards.cpp.rules.namenotreferredusingaqualifiedidorthisaudit_shared.NameNotReferredUsingAQualifiedIdOrThisAudit_shared
33

4-
class TestFileQuery extends NameNotReferredUsingAQualifiedIdOrThisAudit_sharedSharedQuery, TestQuery
5-
{ }
4+
class TestFileQuery extends NameNotReferredUsingAQualifiedIdOrThisAudit_sharedSharedQuery, TestQuery {
5+
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// GENERATED FILE - DO NOT MODIFY
22
import codingstandards.cpp.rules.resultofanassignmentoperatorshouldnotbeused_shared.ResultOfAnAssignmentOperatorShouldNotBeUsed_shared
33

4-
class TestFileQuery extends ResultOfAnAssignmentOperatorShouldNotBeUsed_sharedSharedQuery, TestQuery
5-
{ }
4+
class TestFileQuery extends ResultOfAnAssignmentOperatorShouldNotBeUsed_sharedSharedQuery, TestQuery {
5+
}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| test.cpp:7:3:7:5 | 10 | Non zero octal literal 012. |
2-
| test.cpp:8:3:8:5 | 44 | Non zero octal literal 054. |
1+
| test.cpp:5:3:5:5 | 10 | Non zero octal literal 012. |
2+
| test.cpp:6:3:6:5 | 44 | Non zero octal literal 054. |
Original file line numberDiff line numberDiff line change
@@ -1,13 +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
void test_non_zero_octal() {
2-
'\0'; // COMPLIANT - octal zero escape sequence permitted
3-
'\012'; // NON_COMPLIANT
4-
'\054'; // NON_COMPLIANT
5-
'\0149'; // NON_COMPLIANT
64
0; // COMPLIANT - octal literal zero permitted
75
012; // NON_COMPLIANT
86
054; // NON_COMPLIANT
9-
"\0"; // COMPLIANT - octal zero escape sequence permitted
10-
"\012"; // NON_COMPLIANT
11-
"\054"; // NON_COMPLIANT
12-
"\0149"; // NON_COMPLIANT
137
}

rule_packages/c/Banned.json

+1
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@
338338
"precision": "very-high",
339339
"severity": "error",
340340
"short_name": "OctalConstantsUsed",
341+
"shared_implementation_short_name": "UseOfNonZeroOctalLiteral_shared",
341342
"tags": [
342343
"readability",
343344
"correctness",

0 commit comments

Comments
 (0)