We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8c9158 commit 1cc399bCopy full SHA for 1cc399b
1 file changed
cpp/autosar/test/rules/A5-2-6/test.cpp
@@ -15,4 +15,20 @@ void f2(int p1, int p2) {
15
if ((p1 > 0) || (p2 > 0)) { // COMPLIANT
16
f1();
17
}
18
+
19
+ struct Sample {
20
+ int x;
21
+ } sample;
22
23
+ if ((p1 > 0 ||
24
+ sample.x)) { // COMPLIANT: struct member accessors (.) are excluded
25
+ f1();
26
+ }
27
28
+ Sample *sample_ptr = &sample;
29
30
+ if ((p1 > 0 || sample_ptr->x)) { // COMPLIANT: struct member accessors with
31
+ // dereference (->) are excluded
32
33
34
0 commit comments