Skip to content

Commit 7c68fc1

Browse files
committed
Add a comment for why Demangler::isDigit isn't just std::isdigit.
1 parent 0b79ecf commit 7c68fc1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: include/swift/Basic/Demangle.h

+4
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,10 @@ class DemanglerPrinter {
407407
std::string &Stream;
408408
};
409409

410+
/// Is a character considered a digit by the demangling grammar?
411+
///
412+
/// Yes, this is equivalent to the standard C isdigit(3), but some platforms
413+
/// give isdigit suboptimal implementations.
410414
static inline bool isDigit(int c) {
411415
return c >= '0' && c <= '9';
412416
}

0 commit comments

Comments
 (0)