File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -803,6 +803,9 @@ class alignas(1 << TypeAlignInBits) TypeBase {
803
803
// / Check if this is a CGFloat type from `CoreGraphics` module.
804
804
bool isCGFloatType ();
805
805
806
+ // / Check if thih sis a Double type from standard library.
807
+ bool isDoubleType ();
808
+
806
809
// / Check if this is either an Array, Set or Dictionary collection type defined
807
810
// / at the top level of the Swift module
808
811
bool isKnownStdlibCollectionType ();
Original file line number Diff line number Diff line change @@ -829,6 +829,11 @@ bool TypeBase::isCGFloatType() {
829
829
NTD->getName ().is (" CGFloat" );
830
830
}
831
831
832
+ bool TypeBase::isDoubleType () {
833
+ auto *NTD = getAnyNominal ();
834
+ return NTD ? NTD->getDecl () == getASTContext ().getDoubleDecl () : false ;
835
+ }
836
+
832
837
bool TypeBase::isKnownStdlibCollectionType () {
833
838
if (auto *structType = getAs<BoundGenericStructType>()) {
834
839
auto &ctx = getASTContext ();
You can’t perform that action at this time.
0 commit comments