Skip to content

Commit 8ac0cb8

Browse files
committed
C++: No longer expose _Decimal{32,64,128}
1 parent afb2764 commit 8ac0cb8

File tree

1 file changed

+2
-48
lines changed

1 file changed

+2
-48
lines changed

cpp/ql/lib/semmle/code/cpp/Type.qll

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -802,15 +802,6 @@ private predicate floatingPointTypeMapping(
802802
// _Complex __float128
803803
kind = 39 and base = 2 and domain = TComplexDomain() and realKind = 38 and extended = false
804804
or
805-
// _Decimal32
806-
kind = 40 and base = 10 and domain = TRealDomain() and realKind = 40 and extended = false
807-
or
808-
// _Decimal64
809-
kind = 41 and base = 10 and domain = TRealDomain() and realKind = 41 and extended = false
810-
or
811-
// _Decimal128
812-
kind = 42 and base = 10 and domain = TRealDomain() and realKind = 42 and extended = false
813-
or
814805
// _Float32
815806
kind = 45 and base = 2 and domain = TRealDomain() and realKind = 45 and extended = false
816807
or
@@ -871,9 +862,8 @@ private predicate floatingPointTypeMapping(
871862

872863
/**
873864
* The C/C++ floating point types. See 4.5. This includes `float`, `double` and `long double`, the
874-
* fixed-size floating-point types like `_Float32`, the extended-precision floating-point types like
875-
* `_Float64x`, and the decimal floating-point types like `_Decimal32`. It also includes the complex
876-
* and imaginary versions of all of these types.
865+
* fixed-size floating-point types like `_Float32`, and the extended-precision floating-point types
866+
* like `_Float64x`. It also includes the complex and imaginary versions of all of these types.
877867
*/
878868
class FloatingPointType extends ArithmeticType {
879869
final int base;
@@ -991,42 +981,6 @@ class Float128Type extends RealNumberType, BinaryFloatingPointType {
991981
override string getAPrimaryQlClass() { result = "Float128Type" }
992982
}
993983

994-
/**
995-
* The GNU C `_Decimal32` primitive type. This is not standard C/C++.
996-
* ```
997-
* _Decimal32 d32;
998-
* ```
999-
*/
1000-
class Decimal32Type extends RealNumberType, DecimalFloatingPointType {
1001-
Decimal32Type() { builtintypes(underlyingElement(this), _, 40, _, _, _) }
1002-
1003-
override string getAPrimaryQlClass() { result = "Decimal32Type" }
1004-
}
1005-
1006-
/**
1007-
* The GNU C `_Decimal64` primitive type. This is not standard C/C++.
1008-
* ```
1009-
* _Decimal64 d64;
1010-
* ```
1011-
*/
1012-
class Decimal64Type extends RealNumberType, DecimalFloatingPointType {
1013-
Decimal64Type() { builtintypes(underlyingElement(this), _, 41, _, _, _) }
1014-
1015-
override string getAPrimaryQlClass() { result = "Decimal64Type" }
1016-
}
1017-
1018-
/**
1019-
* The GNU C `_Decimal128` primitive type. This is not standard C/C++.
1020-
* ```
1021-
* _Decimal128 d128;
1022-
* ```
1023-
*/
1024-
class Decimal128Type extends RealNumberType, DecimalFloatingPointType {
1025-
Decimal128Type() { builtintypes(underlyingElement(this), _, 42, _, _, _) }
1026-
1027-
override string getAPrimaryQlClass() { result = "Decimal128Type" }
1028-
}
1029-
1030984
/**
1031985
* The C/C++ `void` type. See 4.7.
1032986
* ```

0 commit comments

Comments
 (0)