Skip to content

Commit

Permalink
Add a comment for why Demangler::isDigit isn't just std::isdigit.
Browse files Browse the repository at this point in the history
  • Loading branch information
jckarter committed Nov 18, 2015
1 parent 0b79ecf commit 7c68fc1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/swift/Basic/Demangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit 7c68fc1

Please sign in to comment.