Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
Our Action relies on clang-format 14 that has different behavior than
clang-format 16 installed by Homebrew.
  • Loading branch information
rvermeulen committed Jan 19, 2024
1 parent 927b2e9 commit 3a4f86e
Showing 1 changed file with 44 additions and 44 deletions.
88 changes: 44 additions & 44 deletions cpp/autosar/test/rules/A3-9-1/test.cpp
Original file line number Diff line number Diff line change
@@ -1,73 +1,73 @@
#include <cstdint>

void test_variable_width_type_variables() {
char c; // NON_COMPLIANT
unsigned char uc; // NON_COMPLIANT
signed char sc; // NON_COMPLIANT
char c; // NON_COMPLIANT
unsigned char uc; // NON_COMPLIANT
signed char sc; // NON_COMPLIANT

int i; // NON_COMPLIANT
unsigned int ui; // NON_COMPLIANT
unsigned u; // NON_COMPLIANT
signed int si; // NON_COMPLIANT
signed s; // NON_COMPLIANT
int i; // NON_COMPLIANT
unsigned int ui; // NON_COMPLIANT
unsigned u; // NON_COMPLIANT
signed int si; // NON_COMPLIANT
signed s; // NON_COMPLIANT

short sh; // NON_COMPLIANT
unsigned short ush; // NON_COMPLIANT
signed short ssh; // NON_COMPLIANT

long l; // NON_COMPLIANT
unsigned long ul; // NON_COMPLIANT
signed long sl; // NON_COMPLIANT
long l; // NON_COMPLIANT
unsigned long ul; // NON_COMPLIANT
signed long sl; // NON_COMPLIANT

std::int8_t i8; // COMPLIANT
std::int16_t i16; // COMPLIANT
std::int32_t i32; // COMPLIANT
std::int64_t i64; // COMPLIANT
std::int8_t i8; // COMPLIANT
std::int16_t i16; // COMPLIANT
std::int32_t i32; // COMPLIANT
std::int64_t i64; // COMPLIANT

std::uint8_t u8; // COMPLIANT
std::uint16_t u16; // COMPLIANT
std::uint32_t u32; // COMPLIANT
std::uint64_t u64; // COMPLIANT
std::uint8_t u8; // COMPLIANT
std::uint16_t u16; // COMPLIANT
std::uint32_t u32; // COMPLIANT
std::uint64_t u64; // COMPLIANT
}

int main(int argc, char *argv[]) { // COMPLIANT
// main as an exception
}

void test_variable_width_type_qualified_variables() {
const char c1 = 0; // NON_COMPLIANT
const unsigned char uc1 = 0; // NON_COMPLIANT
const signed char sc1 = 0; // NON_COMPLIANt
const char c1 = 0; // NON_COMPLIANT
const unsigned char uc1 = 0; // NON_COMPLIANT
const signed char sc1 = 0; // NON_COMPLIANt

const int i1 = 0; // NON_COMPLIANT
const unsigned int ui1 = 0; // NON_COMPLIANT
const unsigned u1 = 0; // NON_COMPLIANT
const signed int si1 = 0; // NON_COMPLIANT
const signed s1 = 0; // NON_COMPLIANT
const int i1 = 0; // NON_COMPLIANT
const unsigned int ui1 = 0; // NON_COMPLIANT
const unsigned u1 = 0; // NON_COMPLIANT
const signed int si1 = 0; // NON_COMPLIANT
const signed s1 = 0; // NON_COMPLIANT

const short sh1 = 0; // NON_COMPLIANT
const unsigned short ush1 = 0; // NON_COMPLIANT
const signed short ssh1 = 0; // NON_COMPLIANT

const long l1 = 0; // NON_COMPLIANT
const unsigned long ul1 = 0; // NON_COMPLIANT
const signed long sl1 = 0; // NON_COMPLIANT
const long l1 = 0; // NON_COMPLIANT
const unsigned long ul1 = 0; // NON_COMPLIANT
const signed long sl1 = 0; // NON_COMPLIANT

volatile char c2; // NON_COMPLIANT
volatile unsigned char uc2; // NON_COMPLIANT
volatile signed char sc2; // NON_COMPLIANt
volatile char c2; // NON_COMPLIANT
volatile unsigned char uc2; // NON_COMPLIANT
volatile signed char sc2; // NON_COMPLIANt

volatile int i2; // NON_COMPLIANT
volatile unsigned int ui2; // NON_COMPLIANT
volatile unsigned u2; // NON_COMPLIANT
volatile signed int si2; // NON_COMPLIANT
volatile signed s2; // NON_COMPLIANT
volatile int i2; // NON_COMPLIANT
volatile unsigned int ui2; // NON_COMPLIANT
volatile unsigned u2; // NON_COMPLIANT
volatile signed int si2; // NON_COMPLIANT
volatile signed s2; // NON_COMPLIANT

volatile short sh2; // NON_COMPLIANT
volatile unsigned short ush2; // NON_COMPLIANT
volatile signed short ssh2; // NON_COMPLIANT
volatile short sh2; // NON_COMPLIANT
volatile unsigned short ush2; // NON_COMPLIANT
volatile signed short ssh2; // NON_COMPLIANT

volatile long l2; // NON_COMPLIANT
volatile unsigned long ul2; // NON_COMPLIANT
volatile signed long sl2; // NON_COMPLIANT
volatile long l2; // NON_COMPLIANT
volatile unsigned long ul2; // NON_COMPLIANT
volatile signed long sl2; // NON_COMPLIANT
}

0 comments on commit 3a4f86e

Please sign in to comment.