aboutsummaryrefslogtreecommitdiffstats
path: root/mutator-lvl0.cpp
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2017-04-02 20:17:34 +0000
committerbloodstalker <thabogre@gmail.com>2017-04-02 20:17:34 +0000
commited445dffb60110dc6dcf509c8ee7a99d1cd7e412 (patch)
treecb6183ccafb45f79981538cb45dc6b0cd499f9e3 /mutator-lvl0.cpp
parentfixing some issues (diff)
downloadmutator-ed445dffb60110dc6dcf509c8ee7a99d1cd7e412.tar.gz
mutator-ed445dffb60110dc6dcf509c8ee7a99d1cd7e412.zip
fixed the temp workarounds for 12.11,10.1 and 10.2. they are proper now.
Diffstat (limited to 'mutator-lvl0.cpp')
-rw-r--r--mutator-lvl0.cpp59
1 files changed, 49 insertions, 10 deletions
diff --git a/mutator-lvl0.cpp b/mutator-lvl0.cpp
index 7e388d4..26b9673 100644
--- a/mutator-lvl0.cpp
+++ b/mutator-lvl0.cpp
@@ -4125,16 +4125,44 @@ public:
uint64_t ICETypeSize = ASTC->getTypeSize(CanonTypeDaddy);
uint64_t ChildTypeSize = ASTC->getTypeSize(CanonTypeChild);
- /*
- bool ICETypeIsSignedInt = CanonTypeDaddy->getAsPlaceholderType()->isSignedInteger();
- bool ChildTypeIsSignedInt = CanonTypeChild->getAsPlaceholderType()->isSignedInteger();
-
- bool ICETypeIsUSignedInt = CanonTypeDaddy->getAsPlaceholderType()->isUnsignedInteger();
- bool ChildTypeIsUSignedInt = CanonTypeChild->getAsPlaceholderType()->isUnsignedInteger();
-
- if (CanonTypeDaddy->getAsPlaceholderType()->isInteger() && CanonTypeChild->getAsPlaceholderType()->isInteger())
- */
+ bool ICETypeIsSignedInt = CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::Long) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::Int) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::Short) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::SChar) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::Char_S) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::LongLong) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::Int128) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::WChar_S);
+ bool ChildTypeIsSignedInt = CanonTypeChild->isSpecificBuiltinType(BuiltinType::Kind::Long) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::Int) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::Short) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::SChar) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::Char_S) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::LongLong) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::Int128) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::WChar_S);
+
+ bool ICETypeIsUSignedInt = CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::ULong) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::UInt) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::UShort) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::UChar) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::Char_U) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::ULongLong) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::UInt128) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::WChar_U);
+ bool ChildTypeIsUSignedInt = CanonTypeChild->isSpecificBuiltinType(BuiltinType::Kind::ULong) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::UInt) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::UShort) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::UChar) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::Char_U) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::ULongLong) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::UInt128) || \
+ CanonTypeDaddy->isSpecificBuiltinType(BuiltinType::Kind::WChar_U);
+
+ bool ICETypeIsInteger = ICETypeIsSignedInt || ICETypeIsUSignedInt;
+ bool ChildTypeIsInteger = ChildTypeIsSignedInt || ChildTypeIsUSignedInt;
+#if 0
bool ICETypeIsSignedInt = false;
bool ICETypeIsUSignedInt = false;
bool ICETypeIsInteger = false;
@@ -4158,6 +4186,7 @@ public:
ChildTypeIsInteger = placeholderType->isInteger();
}
}
+#endif
if (ICETypeIsInteger && ChildTypeIsInteger)
{
@@ -4919,7 +4948,16 @@ public:
const clang::Type* CanonTP = ASTC->getCanonicalType(TP);
- //bool TypeIsUSignedInt = CanonTP->getAsPlaceholderType()->isUnsignedInteger();
+ bool TypeIsUSignedInt = CanonTP->isSpecificBuiltinType(BuiltinType::Kind::ULong) || \
+ CanonTP->isSpecificBuiltinType(BuiltinType::Kind::UInt) || \
+ CanonTP->isSpecificBuiltinType(BuiltinType::Kind::UShort) || \
+ CanonTP->isSpecificBuiltinType(BuiltinType::Kind::UChar) || \
+ CanonTP->isSpecificBuiltinType(BuiltinType::Kind::Char_U) || \
+ CanonTP->isSpecificBuiltinType(BuiltinType::Kind::ULongLong) || \
+ CanonTP->isSpecificBuiltinType(BuiltinType::Kind::UInt128) || \
+ CanonTP->isSpecificBuiltinType(BuiltinType::Kind::WChar_U);
+
+#if 0
bool TypeIsUSignedInt = false;
if (CanonTP) {
auto placeholderType = CanonTP->getAsPlaceholderType();
@@ -4927,6 +4965,7 @@ public:
TypeIsUSignedInt = placeholderType->isUnsignedInteger();
}
}
+#endif
if (TypeIsUSignedInt)
{