AutosarC++17_10-A2.6.1ΒΆ
Digraphs shall not be used
Required inputs: IR
| Level | required |
|---|---|
| Target | implementation |
| Enforcement | automated |
Rationale
The digraphs are: <%, %>, <:, :>, %:, %:%:.
The use of digraphs may not meet developer expectations.
Example
//% $Id: A2-6-1.cpp 289436 2017-10-04 10:45:23Z michal.szczepankiewicz $
class A {
public:
void F2() {}
};
// void fn1(A* a<:10:>) // Non-compliant
// <%
// a<:0:>->f2();
// %>
void Fn2(A *a[10]) // Compliant, equivalent to the above
{
a[0]->F2();
}
See Also
- MISRA C++ 2008 [6]: advisory 2-5-1 Digraphs should not be used.
- JSF December 2005 [7]: 4.4.1 AV Rule 12 The following digraphs will not be used.
- HIC++ v4.0 [8]: 2.2.1 Do not use digraphs or trigraphs.
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
digraph_use |
Digraph used. |
None |
False |
Options
This rule shares the following common options: confidence, exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
This rule has no individual options.