Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Address False Positives for Autosar A13-5-2#186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
lcartey merged 10 commits intomainfromjeongsoolee09/a13-5-2
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
- `A13-5-2` - address a false positive where lambda expressions with empty captures were being flagged as having a non-compliant conversion operator.
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,5 +27,6 @@ class ExplicitConversionOperator extends ConversionOperator {
from ConversionOperator op
where
not isExcluded(op, OperatorsPackage::userDefinedConversionOperatorsNotDefinedExplicitQuery()) and
not op instanceof ExplicitConversionOperator
not op instanceof ExplicitConversionOperator and
not op.isCompilerGenerated()
select op, "User-defined conversion operator is not explicit."
13 changes: 12 additions & 1 deletioncpp/autosar/test/rules/A13-5-2/test.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,4 +8,15 @@ class A {
operator int() const { return d; } // NON_COMPLIANT
private:
float d;
};
};

void test_compiler_generated() {
int x = 0;

auto capture = [x]() -> int { return x; };

auto no_capture = []() -> int {
int x = 1;
return x;
};
}

[8]ページ先頭

©2009-2025 Movatter.jp