Qt-Autosar-A2.5.2ΒΆ
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-5-2.cpp 305382 2018-01-26 06:32:15Z 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 [7]: advisory 2-5-1 Digraphs should not be used.
- JSF December 2005 [8]: 4.4.1 AV Rule 12 The following digraphs will not be used.
- HIC++ v4.0 [9]: 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.