Correct nullability annotations on MakeNan Neither GCC nor Clang's __builtin_nan(), nor glibc's nan(), accept null pointers. PiperOrigin-RevId: 595767225 Change-Id: I4cddd1cafd0c9e83a823ec68386f10ce077c6b4c
diff --git a/absl/strings/charconv.cc b/absl/strings/charconv.cc index eda6d50..0c9227f 100644 --- a/absl/strings/charconv.cc +++ b/absl/strings/charconv.cc
@@ -120,7 +120,7 @@ // Parsing a smaller N will produce something finite. static constexpr int kEiselLemireMaxExclusiveExp10 = 309; - static double MakeNan(absl::Nullable<const char*> tagp) { + static double MakeNan(absl::Nonnull<const char*> tagp) { #if ABSL_HAVE_BUILTIN(__builtin_nan) // Use __builtin_nan() if available since it has a fix for // https://bugs.llvm.org/show_bug.cgi?id=37778 @@ -193,7 +193,7 @@ static constexpr int kEiselLemireMinInclusiveExp10 = -46 - 18; static constexpr int kEiselLemireMaxExclusiveExp10 = 39; - static float MakeNan(absl::Nullable<const char*> tagp) { + static float MakeNan(absl::Nonnull<const char*> tagp) { #if ABSL_HAVE_BUILTIN(__builtin_nanf) // Use __builtin_nanf() if available since it has a fix for // https://bugs.llvm.org/show_bug.cgi?id=37778