Skip to content

Commit 1eb4677

Browse files
committed
A0-4-1: __libcpp_numeric_limits
1 parent c486f48 commit 1eb4677

7 files changed

+25
-1
lines changed

cpp/autosar/src/rules/A0-4-1/FloatingPointImplementationShallComplyWithIeeeStandard.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import codingstandards.cpp.autosar
2121
import codingstandards.cpp.TypeUses
2222

2323
class NumericLimits extends Class {
24-
NumericLimits() { this.hasQualifiedName("std", "numeric_limits") }
24+
NumericLimits() { this.hasQualifiedName("std", ["numeric_limits", "__libcpp_numeric_limits"]) }
2525

2626
/**
2727
* Gets the template argument specified for this type.

cpp/autosar/test/rules/A0-4-1/FloatingPointImplementationShallComplyWithIeeeStandard.expected.clang

Whitespace-only changes.

cpp/autosar/test/rules/A0-4-1/FloatingPointImplementationShallComplyWithIeeeStandard.expected.gcc

Whitespace-only changes.

cpp/autosar/test/rules/A0-4-1/FloatingPointImplementationShallComplyWithIeeeStandard.expected.qcc

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include <limits>
2+
3+
void test() {
4+
float f; // COMPLIANT
5+
6+
double d; // COMPLIANT
7+
long double ld; // COMPLIANT
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include <limits>
2+
3+
void test() {
4+
float f; // COMPLIANT
5+
6+
double d; // COMPLIANT
7+
long double ld; // COMPLIANT
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include <limits>
2+
3+
void test() {
4+
float f; // COMPLIANT
5+
6+
double d; // COMPLIANT
7+
long double ld; // COMPLIANT
8+
}

0 commit comments

Comments
 (0)