Skip to content

Commit ecbb588

Browse files
authored
Merge branch 'main' into rvermeulen/fix-392
2 parents de82e22 + 34d836f commit ecbb588

File tree

47 files changed

+302
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+302
-62
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- The following queries have been updated to address issues with applying deviations:
2+
- `A18-5-11`, `A23-0-1`, `A9-3-1`, `M0-1-2`, `M3-1-2`, `M3-2-1`, `M3-2-3`, `M3-9-1`, `M4-5-3`, `M5-0-2`, `M5-2-10`, `A23-0-2`, `CTR51-CPP`, `STR52-CPP`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
- `A5-1-1` - `LiteralValueUsedOutsideTypeInit.ql`:
2+
- Address FP reported in #371. Exclude literals generated by uses of constexpr variables.
3+
- Exclude literals used in class template instantiations.
4+
- Update the alert message to adhere to the style-guide.
5+
- Exclude boolean literals used as template arguments.
6+
- Exclude `u` and `U` prefixed char literals.
7+
- Exclude literals part of a class aggregate literal.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- `A5-0-2` - `NonBooleanIterationCondition.ql`:
2+
- Address FP reported in #10. Exclude conditions in uninstantiated templates.
3+
- `M5-3-1` - `EachOperandOfTheOperatorTheLogicalAndOrTheLogicalOperatorsShallHaveTypeBool.ql`:
4+
- Adjust the alert message to comply with the style guide.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- `M5-14-1` - `RightHandOperandOfALogicalAndOperatorsContainSideEffects.ql`:
2+
- Fix FP reported in #375. Addresses incorrect detection of side effects in unevaluated contexts.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- `A16-2-2` - `UnusedIncludeDirectives.ql`:
2+
- Address FP reported in #453. Exclude reporting of redundant include directives indirectly included by included files.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- `A8-4-7` - `InParametersForNotCheapToCopyTypesNotPassedByReference.ql`, `InParametersForCheapToCopyTypesNotPassedByValue.ql`:
2+
- Improve coverage of the query by additionally alerting to non-trivially-copyable types being passed by value.
3+
- Non-trivially-copyable types not passed by value will no longer be incorrectly reported.

cpp/autosar/src/rules/A16-2-2/UnusedIncludeDirectives.ql

+12-3
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,19 @@ private predicate firstReliableProvide(File f, File g, int line) {
223223

224224
cached
225225
predicate mayProvideFirst(IncludeDepends i, File g) {
226-
// i may provide g and does not come after a reliable include of g.
226+
// i may provide g
227227
i.provides(g) and
228-
not exists(int line | firstReliableProvide(i.getFile(), g, line) |
229-
line < i.getLocation().getStartLine()
228+
(
229+
// and does not come after a reliable include of g.
230+
not exists(int line | firstReliableProvide(i.getFile(), g, line) |
231+
line < i.getLocation().getStartLine()
232+
)
233+
or
234+
// or it comes after a reliable include of g, and although redundant,
235+
// is not necessarily an issue e.g. in the case of libraries with
236+
// public header forwards to an internal header.
237+
// therefore, hold for transitive includes as well to exclude those results.
238+
not i.getIncludedFile() = g
230239
)
231240
}
232241

cpp/autosar/src/rules/A18-5-11/OperatorNewAndOperatorDeleteNotDefinedLocally.ql

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import codingstandards.cpp.autosar
1919

2020
from MemberFunction operator_new, Class c
2121
where
22-
not isExcluded(operator_new) and
22+
not isExcluded(operator_new,
23+
DeclarationsPackage::operatorNewAndOperatorDeleteNotDefinedLocallyQuery()) and
2324
not isExcluded(c, DeclarationsPackage::operatorNewAndOperatorDeleteNotDefinedLocallyQuery()) and
2425
operator_new.hasName("operator new") and
2526
operator_new.getDeclaringType() = c and

cpp/autosar/src/rules/A23-0-1/IteratorImplicitlyConvertedToConstIterator.ql

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ import codingstandards.cpp.Iterators
4040

4141
from ConstIteratorVariable v, STLContainer c, Expr e
4242
where
43-
not isExcluded(v) and
44-
not isExcluded(e) and
43+
not isExcluded(v, IteratorsPackage::iteratorImplicitlyConvertedToConstIteratorQuery()) and
44+
not isExcluded(e, IteratorsPackage::iteratorImplicitlyConvertedToConstIteratorQuery()) and
4545
e = v.getAnAssignedValue() and
4646
e.getAChild*() = /* see note at top of query */ c.getANonConstIteratorFunctionCall()
4747
select e, "Non-const version of container call immediately converted to a `const_iterator`."

cpp/autosar/src/rules/A5-1-1/LiteralValueUsedOutsideTypeInit.ql

+14-6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import cpp
1818
import codingstandards.cpp.autosar
1919
import codingstandards.cpp.LoggingOperation
2020
import codingstandards.cpp.Literals
21+
import codingstandards.cpp.Cpp14Literal
2122

2223
from Literal l
2324
where
@@ -35,11 +36,11 @@ where
3536
// Exclude literal 0
3637
not l.getValue() = "0" and
3738
// Exclude character literals
38-
not l instanceof CharLiteral and
39+
not l instanceof Cpp14Literal::CharLiteral and
3940
// Exclude `nullptr`
4041
not l.getType() instanceof NullPointerType and
4142
// Exclude boolean `true` and `false`
42-
not l.getType() instanceof BoolType and
43+
not l instanceof BoolLiteral and
4344
// Exclude empty string
4445
not l.getValue() = "" and
4546
// Template functions use literals to represent calls which are unknown
@@ -51,7 +52,14 @@ where
5152
// Aggregate literal
5253
not l = any(ArrayOrVectorAggregateLiteral aal).getAnElementExpr(_).getAChild*() and
5354
// Ignore x - 1 expressions
54-
not exists(SubExpr se | se.getRightOperand() = l and l.getValue() = "1")
55-
select l,
56-
"Literal value " + getTruncatedLiteralText(l) + " used outside of type initialization " +
57-
l.getAPrimaryQlClass()
55+
not exists(SubExpr se | se.getRightOperand() = l and l.getValue() = "1") and
56+
// Exclude compile time computed integral literals as they can appear as integral literals
57+
// when used as non-type template arguments.
58+
// We limit ourselves to integral literals, because floating point literals as non-type
59+
// template arguments are not supported in C++ 14. Those are supported shince C++ 20.
60+
not l instanceof CompileTimeComputedIntegralLiteral and
61+
// Exclude literals to instantiate a class template per example in the standard
62+
// where an type of std::array is intialized with size 5.
63+
not l = any(ClassTemplateInstantiation cti).getATemplateArgument() and
64+
not l = any(ClassAggregateLiteral cal).getAFieldExpr(_)
65+
select l, "Literal value '" + getTruncatedLiteralText(l) + "' used outside of type initialization."

cpp/autosar/src/rules/A8-4-7/InParametersForCheapToCopyTypesNotPassedByValue.ql

+5-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import cpp
1717
import codingstandards.cpp.autosar
18-
import TriviallySmallType
18+
import TriviallyCopyableSmallType
1919
import codingstandards.cpp.CommonTypes as CommonTypes
2020
import codingstandards.cpp.Class
2121

@@ -26,7 +26,7 @@ import codingstandards.cpp.Class
2626
* In this rule, we will look cases where a "cheap to copy" type is not passed by value.
2727
*/
2828

29-
from Parameter v, TriviallySmallType t
29+
from Parameter v, TriviallyCopyableSmallType t
3030
where
3131
not isExcluded(v, ClassesPackage::inParametersForCheapToCopyTypesNotPassedByValueQuery()) and
3232
exists(ReferenceType rt |
@@ -40,5 +40,6 @@ where
4040
not v.isFromUninstantiatedTemplate(_) and
4141
not v.isFromTemplateInstantiation(_)
4242
select v,
43-
"Parameter '" + v.getName() + "' is the trivially copyable type '" + t.getName() +
44-
"' but it is passed by reference instead of by value."
43+
"Parameter '" + v.getName() +
44+
"' is the trivially copyable type $@ but it is passed by reference instead of by value.", t,
45+
t.getName()

cpp/autosar/src/rules/A8-4-7/InParametersForNotCheapToCopyTypesNotPassedByReference.ql

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import cpp
1717
import codingstandards.cpp.autosar
18-
import TriviallySmallType
18+
import TriviallyCopyableSmallType
1919
import codingstandards.cpp.CommonTypes as CommonTypes
2020

2121
/*
@@ -28,12 +28,12 @@ import codingstandards.cpp.CommonTypes as CommonTypes
2828
from Parameter v
2929
where
3030
not isExcluded(v, ClassesPackage::inParametersForNotCheapToCopyTypesNotPassedByReferenceQuery()) and
31-
not v.getType() instanceof TriviallySmallType and
31+
not v.getType() instanceof TriviallyCopyableSmallType and
3232
not v.getType().getUnderlyingType() instanceof ReferenceType and
3333
not exists(CatchBlock cb | cb.getParameter() = v) and
3434
not v.isFromUninstantiatedTemplate(_) and
3535
not v.isFromTemplateInstantiation(_)
3636
select v,
37-
"Parameter " + v.getName() +
38-
" is the trivially non-copyable type $@ but it is passed by value instead of by reference.",
37+
"Parameter '" + v.getName() +
38+
"' is the trivially non-copyable type $@ but it is passed by value instead of by reference.",
3939
v.getType(), v.getType().getName()

cpp/autosar/src/rules/A8-4-7/TriviallySmallType.qll renamed to cpp/autosar/src/rules/A8-4-7/TriviallyCopyableSmallType.qll

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import cpp
22
import codingstandards.cpp.autosar
3+
import codingstandards.cpp.TrivialType
34

45
/**
56
* Get the largest word size, in bytes. Some projects may have multiple different
@@ -13,6 +14,9 @@ int wordSize() { result = max(VoidPointerType v | | v.getSize()) }
1314
bindingset[bytes]
1415
int bytesToWords(int bytes) { result = bytes / wordSize() }
1516

16-
class TriviallySmallType extends Type {
17-
TriviallySmallType() { exists(int size | size = this.getSize() | bytesToWords(size) <= 2) }
17+
class TriviallyCopyableSmallType extends Type {
18+
TriviallyCopyableSmallType() {
19+
isTriviallyCopyableType(this) and
20+
exists(int size | size = this.getSize() | bytesToWords(size) <= 2)
21+
}
1822
}

cpp/autosar/src/rules/A9-3-1/ReturnsNonConstRawPointersOrReferencesToPrivateOrProtectedData.ql

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ class AccessAwareMemberFunction extends MemberFunction {
5757

5858
from Class c, AccessAwareMemberFunction mf, FieldAccess a, ReturnStmt rs
5959
where
60-
not isExcluded(c) and
60+
not isExcluded(c,
61+
ClassesPackage::returnsNonConstRawPointersOrReferencesToPrivateOrProtectedDataQuery()) and
6162
not isExcluded(mf,
6263
ClassesPackage::returnsNonConstRawPointersOrReferencesToPrivateOrProtectedDataQuery()) and
6364
// Find all of the methods within this class

cpp/autosar/src/rules/M0-1-2/InfeasiblePath.ql

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,6 @@ predicate hasInfeasiblePath(
158158

159159
from ConditionalControlFlowNode cond, boolean infeasiblePath, string explanation
160160
where
161-
not isExcluded(cond) and
161+
not isExcluded(cond, DeadCodePackage::infeasiblePathQuery()) and
162162
hasInfeasiblePath(cond, infeasiblePath, explanation)
163163
select cond, "The " + infeasiblePath + " path is infeasible because " + explanation + "."

cpp/autosar/src/rules/M3-1-2/FunctionsDeclaredAtBlockScope.ql

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import codingstandards.cpp.autosar
2020

2121
from DeclStmt decl, Function f
2222
where
23-
not isExcluded(decl) and
23+
not isExcluded(decl, DeclarationsPackage::functionsDeclaredAtBlockScopeQuery()) and
2424
not isExcluded(f, DeclarationsPackage::functionsDeclaredAtBlockScopeQuery()) and
2525
decl.getADeclaration() = f
2626
select f, "Function " + f.getName() + " is declared at block scope."

cpp/autosar/src/rules/M3-2-1/DeclarationsOfAFunctionShallHaveCompatibleTypes.ql

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import codingstandards.cpp.Typehelpers
2222

2323
from FunctionDeclarationEntry f1, FunctionDeclarationEntry f2
2424
where
25-
not isExcluded(f1) and
25+
not isExcluded(f1, DeclarationsPackage::declarationsOfAFunctionShallHaveCompatibleTypesQuery()) and
2626
not isExcluded(f2, DeclarationsPackage::declarationsOfAFunctionShallHaveCompatibleTypesQuery()) and
2727
not f1 = f2 and
2828
f1.getDeclaration() = f2.getDeclaration() and

cpp/autosar/src/rules/M3-2-3/MultipleDeclarationViolation.ql

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import codingstandards.cpp.Scope
2020

2121
from DeclarationEntry de, DeclarationEntry otherDeclaration, string kind
2222
where
23-
not isExcluded(de) and
23+
not isExcluded(de, ScopePackage::multipleDeclarationViolationQuery()) and
2424
exists(Declaration d |
2525
de.getDeclaration() = d and
2626
otherDeclaration.getDeclaration() = d and

cpp/autosar/src/rules/M3-9-1/TypesNotIdenticalInObjectDeclarations.ql

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import codingstandards.cpp.autosar
1818

1919
from VariableDeclarationEntry decl1, VariableDeclarationEntry decl2
2020
where
21-
not isExcluded(decl1) and
21+
not isExcluded(decl1, DeclarationsPackage::typesNotIdenticalInObjectDeclarationsQuery()) and
2222
not isExcluded(decl2, DeclarationsPackage::typesNotIdenticalInObjectDeclarationsQuery()) and
2323
decl1.getDeclaration() = decl2.getDeclaration() and
2424
not decl1.getType() = decl2.getType()

cpp/autosar/src/rules/M3-9-1/TypesNotIdenticalInReturnDeclarations.ql

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import codingstandards.cpp.autosar
1818

1919
from FunctionDeclarationEntry f1, FunctionDeclarationEntry f2
2020
where
21-
not isExcluded(f1) and
21+
not isExcluded(f1, DeclarationsPackage::typesNotIdenticalInReturnDeclarationsQuery()) and
2222
not isExcluded(f2, DeclarationsPackage::typesNotIdenticalInReturnDeclarationsQuery()) and
2323
f1.getDeclaration() = f2.getDeclaration() and
2424
not f1.getType() = f2.getType()

cpp/autosar/src/rules/M4-5-3/CharUsedAsOperandsToDisallowedBuiltInOperators.ql

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import codingstandards.cpp.autosar
2222

2323
from Operation o
2424
where
25-
not isExcluded(o) and
25+
not isExcluded(o, ExpressionsPackage::charUsedAsOperandsToDisallowedBuiltInOperatorsQuery()) and
2626
not (
2727
o instanceof EqualityOperation or
2828
o instanceof BitwiseAndExpr or

cpp/autosar/src/rules/M5-0-2/GratuitousUseOfParentheses.ql

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ predicate isGratuitousUseOfParentheses(ParenthesisExpr pe) {
8484

8585
from ParenthesisExpr p
8686
where
87-
not isExcluded(p) and
87+
not isExcluded(p, OrderOfEvaluationPackage::gratuitousUseOfParenthesesQuery()) and
8888
isGratuitousUseOfParentheses(p) and
8989
not p.isInMacroExpansion()
9090
select p, "Gratuitous use of parentheses around $@.", p.getExpr(), p.getExpr().toString()

cpp/autosar/src/rules/M5-14-1/RightHandOperandOfALogicalAndOperatorsContainSideEffects.ql

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ import cpp
1818
import codingstandards.cpp.autosar
1919
import codingstandards.cpp.SideEffect
2020
import codingstandards.cpp.sideeffect.DefaultEffects
21+
import codingstandards.cpp.Expr
2122

2223
from BinaryLogicalOperation op, Expr rhs
2324
where
2425
not isExcluded(op,
2526
SideEffects1Package::rightHandOperandOfALogicalAndOperatorsContainSideEffectsQuery()) and
2627
rhs = op.getRightOperand() and
27-
hasSideEffect(rhs)
28+
hasSideEffect(rhs) and
29+
not rhs instanceof UnevaluatedExprExtension
2830
select op, "The $@ may have a side effect that is not always evaluated.", rhs, "right-hand operand"

cpp/autosar/src/rules/M5-2-10/IncrementAndDecrementOperatorsMixedWithOtherOperatorsInExpression.ql

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import codingstandards.cpp.Expr
2020

2121
from CrementOperation cop, ArithmeticOperation op, string name
2222
where
23-
not isExcluded(cop) and
23+
not isExcluded(cop,
24+
OrderOfEvaluationPackage::incrementAndDecrementOperatorsMixedWithOtherOperatorsInExpressionQuery()) and
2425
not isExcluded(op,
2526
OrderOfEvaluationPackage::incrementAndDecrementOperatorsMixedWithOtherOperatorsInExpressionQuery()) and
2627
op.getAnOperand() = cop and

cpp/autosar/src/rules/M5-3-1/EachOperandOfTheOperatorTheLogicalAndOrTheLogicalOperatorsShallHaveTypeBool.ql

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ where
2929
rt = t.getUnderlyingType().getUnspecifiedType() and rt.getBaseType() instanceof BoolType
3030
) and
3131
not operand.isFromUninstantiatedTemplate(_)
32-
select operand, "bool operator called with a non-bool operand of type " + t.getName() + "."
32+
select operand, "Call to bool operator with a non-bool operand of type '" + t.getName() + "'."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
void f();
+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
void f();
1+
#include "z.h"
2+
3+
void g() { f(); }
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include "test.hpp" // COMPLIANT
2+
#include "z.h" // COMPLIANT
3+
4+
void test() {
5+
f();
6+
g();
7+
}

cpp/autosar/test/rules/A16-2-2/z.h

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "internal.h"
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
| test.cpp:5:9:5:25 | constant string | Literal value "constant string" used outside of type initialization StringLiteral |
2-
| test.cpp:14:23:14:25 | 100 | Literal value 100 used outside of type initialization Literal |
3-
| test.cpp:54:7:54:7 | 1 | Literal value 1 used outside of type initialization Literal |
4-
| test.cpp:75:23:75:28 | test | Literal value "test" used outside of type initialization StringLiteral |
5-
| test.cpp:76:19:76:28 | not okay | Literal value "not okay" used outside of type initialization StringLiteral |
1+
| test.cpp:5:9:5:25 | constant string | Literal value '"constant string"' used outside of type initialization. |
2+
| test.cpp:14:23:14:25 | 100 | Literal value '100' used outside of type initialization. |
3+
| test.cpp:54:7:54:7 | 1 | Literal value '1' used outside of type initialization. |
4+
| test.cpp:75:23:75:28 | test | Literal value '"test"' used outside of type initialization. |
5+
| test.cpp:76:19:76:28 | not okay | Literal value '"not okay"' used outside of type initialization. |
6+
| test.cpp:104:8:104:8 | 4 | Literal value '4' used outside of type initialization. |
7+
| test.cpp:104:8:104:8 | 4 | Literal value '4' used outside of type initialization. |
8+
| test.cpp:104:8:104:8 | 4 | Literal value '4' used outside of type initialization. |

cpp/autosar/test/rules/A5-1-1/test.cpp

+37-1
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,46 @@ void test_not_wrapper_stream(std::ostream &os, const char *str) noexcept {
8080
#define MACRO_LOG(test_str) \
8181
do { \
8282
struct test_struct { \
83-
static const char *get_str() { return static_cast<char *>(test_str); } \
83+
static const char *get_str() { \
84+
return static_cast<const char *>(test_str); \
85+
} \
8486
}; \
8587
} while (false)
8688

8789
void f() {
8890
MACRO_LOG("test"); // COMPLIANT - exclusion
91+
}
92+
93+
template <typename T> struct S1 { static constexpr size_t value(); };
94+
95+
template <> struct S1<int> {
96+
static constexpr size_t value() { return sizeof(int); };
97+
};
98+
99+
constexpr size_t g1 = S1<int>::value();
100+
constexpr size_t f1() { return sizeof(int); }
101+
102+
template <typename T, int size> struct S2 {
103+
T m1[size]; // COMPLIANT
104+
T m2[4]; // NON_COMPLIANT
105+
};
106+
107+
template <typename T, T val> struct S3 {
108+
static constexpr T value = val; // COMPLIANT;
109+
};
110+
111+
void test_fp_reported_in_371() {
112+
struct S2<int, 1> l1; // COMPLIANT
113+
struct S2<int, g1> l2; // COMPLIANT
114+
struct S2<int, f1()> l3; // COMPLIANT
115+
116+
S3<char16_t, u'\u03c0'> l4; // COMPLIANT
117+
S3<char16_t, S3<char16_t, u'\u2286'>::value> l5; // COMPLIANT
118+
S3<char32_t, U'🌌'> l6; // COMPLIANT
119+
S3<char32_t, S3<char32_t, U''>::value> l7; // COMPLIANT
120+
121+
constexpr float l8 = 3.14159f;
122+
#define delta 0.1f
123+
for (float i = 0.0f; i < l8; i += delta) { // COMPLIANT
124+
}
89125
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| test.cpp:20:19:20:21 | f5a | Parameter 'f5a' is the trivially copyable type 'const S1' but it is passed by reference instead of by value. |
1+
| test.cpp:22:19:22:21 | f5a | Parameter 'f5a' is the trivially copyable type $@ but it is passed by reference instead of by value. | file://:0:0:0:0 | const S1 | const S1 |
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
| test.cpp:23:12:23:14 | f8a | Parameter f8a is the trivially non-copyable type $@ but it is passed by value instead of by reference. | test.cpp:14:8:14:9 | S2 | S2 |
2-
| test.cpp:27:13:27:16 | f12a | Parameter f12a is the trivially non-copyable type $@ but it is passed by value instead of by reference. | test.cpp:14:8:14:9 | S2 | S2 |
1+
| test.cpp:25:12:25:14 | f8a | Parameter 'f8a' is the trivially non-copyable type $@ but it is passed by value instead of by reference. | test.cpp:16:8:16:9 | S2 | S2 |
2+
| test.cpp:29:13:29:16 | f12a | Parameter 'f12a' is the trivially non-copyable type $@ but it is passed by value instead of by reference. | test.cpp:16:8:16:9 | S2 | S2 |
3+
| test.cpp:70:13:70:16 | f17a | Parameter 'f17a' is the trivially non-copyable type $@ but it is passed by value instead of by reference. | test.cpp:60:8:60:9 | S4 | S4 |

0 commit comments

Comments
 (0)