zturner added inline comments.
================ Comment at: llvm/include/llvm/Support/YAMLTraits.h:454 +inline bool isNumeric(StringRef S) { + if (S.empty()) + return false; ---------------- What would happen if we re-wrote this entire function as: ``` inline bool isNumeric(StringRef S) { uint64_t N; int64_t I; APFloat F; return S.getAsInteger(N) || S.getAsInteger(I) || (F.convertFromString(S) == opOK); } ``` Would this a) Be correct, and b) have similar performance characteristics to what you've got here? https://reviews.llvm.org/D50839 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits