From 002f930dbafdbec07b9e5051f9787d360768bf51 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Thu, 9 Jul 2020 15:54:42 +0200 Subject: [PATCH] C#: Sync identical files --- .../ql/src/experimental/ir/implementation/IRType.qll | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/csharp/ql/src/experimental/ir/implementation/IRType.qll b/csharp/ql/src/experimental/ir/implementation/IRType.qll index 41c9ac06d82..3bf3bf2e276 100644 --- a/csharp/ql/src/experimental/ir/implementation/IRType.qll +++ b/csharp/ql/src/experimental/ir/implementation/IRType.qll @@ -152,6 +152,12 @@ class IRIntegerType extends IRNumericType { this = TIRSignedIntegerType(byteSize) or this = TIRUnsignedIntegerType(byteSize) } + + /** Holds if this integer type is signed. */ + predicate isSigned() { none() } + + /** Holds if this integer type is unsigned. */ + predicate isUnsigned() { none() } // Don't override `getByteSize()` here. The optimizer seems to generate better code when this is // overridden only in the leaf classes. } @@ -169,6 +175,8 @@ class IRSignedIntegerType extends IRIntegerType, TIRSignedIntegerType { pragma[noinline] final override int getByteSize() { result = byteSize } + + override predicate isSigned() { any() } } /** @@ -184,6 +192,8 @@ class IRUnsignedIntegerType extends IRIntegerType, TIRUnsignedIntegerType { pragma[noinline] final override int getByteSize() { result = byteSize } + + override predicate isUnsigned() { any() } } /**