Skip to content

Commit 3bedebb

Browse files
committed
Minor improvement
1 parent f2cf20e commit 3bedebb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

cpp/autosar/test/rules/M0-1-10/test.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,11 @@ TEST(sample_test,
158158
bool pass = false;
159159
if (called_from_google_test_function(0) >= 10)
160160
pass = true;
161+
struct a_nested_class_in_gtest {
162+
a_nested_class_in_gtest() noexcept(false) {
163+
static_cast<void>(0);
164+
} // COMPLIANT
165+
};
166+
static_assert(std::is_trivially_copy_constructible<a_nested_class_in_gtest>(),
167+
"assert");
161168
}

cpp/common/src/codingstandards/cpp/EncapsulatingFunctions.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class GoogleTestFunction extends MainLikeFunction {
3636
) and
3737
// it's parent class inherits a base class
3838
exists(Class base |
39-
base = this.getEnclosingAccessHolder().(Class).getABaseClass+() and
39+
base = this.getEnclosingAccessHolder+().(Class).getABaseClass+() and
4040
(
4141
// with a name "Test" inside a namespace called "testing"
4242
base.hasName("Test") and

0 commit comments

Comments
 (0)