File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,9 @@ import cpp
15
15
import codingstandards.c.misra
16
16
import codingstandards.cpp.IntegerConstantMacro
17
17
18
-
19
18
from MacroInvocation macroInvoke , IntegerConstantMacro macro
20
19
where
21
20
not isExcluded ( macroInvoke , Types2Package:: useOfBannedSmallIntegerConstantMacroQuery ( ) ) and
22
- macroInvoke .getMacro ( ) = macro
23
- and macro .isSmall ( )
24
- select
25
- macroInvoke , "Usage of small integer constant macro " + macro .getName ( ) + " is not allowed."
21
+ macroInvoke .getMacro ( ) = macro and
22
+ macro .isSmall ( )
23
+ select macroInvoke , "Usage of small integer constant macro " + macro .getName ( ) + " is not allowed."
Original file line number Diff line number Diff line change 1
1
#include "stdint.h"
2
2
3
- int8_t g1 = INT8_C (0x12 ); // NON-COMPLIANT
4
- uint8_t g2 = UINT8_C (0x12 ); // NON-COMPLIANT
5
- int16_t g3 = INT16_C (0x1234 ); // NON-COMPLIANT
3
+ int8_t g1 = INT8_C (0x12 ); // NON-COMPLIANT
4
+ uint8_t g2 = UINT8_C (0x12 ); // NON-COMPLIANT
5
+ int16_t g3 = INT16_C (0x1234 ); // NON-COMPLIANT
6
6
uint16_t g4 = UINT16_C (0x1234 ); // NON-COMPLIANT
7
- int32_t g5 = INT32_C (0x1234 ); // COMPLIANT
7
+ int32_t g5 = INT32_C (0x1234 ); // COMPLIANT
8
8
uint32_t g6 = UINT32_C (0x1234 ); // COMPLIANT
9
- int64_t g7 = INT64_C (0x1234 ); // COMPLIANT
9
+ int64_t g7 = INT64_C (0x1234 ); // COMPLIANT
10
10
uint64_t g8 = UINT64_C (0x1234 ); // COMPLIANT
You can’t perform that action at this time.
0 commit comments