From 7c68fc14c44f8944502660305b7b80d28c68a540 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Tue, 17 Nov 2015 14:30:16 -0800 Subject: [PATCH] Add a comment for why Demangler::isDigit isn't just std::isdigit. --- include/swift/Basic/Demangle.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/swift/Basic/Demangle.h b/include/swift/Basic/Demangle.h index 9b3ce48f4cacc..8d924451c72cc 100644 --- a/include/swift/Basic/Demangle.h +++ b/include/swift/Basic/Demangle.h @@ -407,6 +407,10 @@ class DemanglerPrinter { std::string &Stream; }; +/// Is a character considered a digit by the demangling grammar? +/// +/// Yes, this is equivalent to the standard C isdigit(3), but some platforms +/// give isdigit suboptimal implementations. static inline bool isDigit(int c) { return c >= '0' && c <= '9'; }