Fix Clang-tidy modernize-use-nullptr warnings in examples and include directories...
[oota-llvm.git] / examples / Kaleidoscope / Chapter5 / toy.cpp
index 57edf1aa8454da358aad51847fcfe7d9512ee154..eeca4775eeb11698617b88fa8b2275dee9b1cdb7 100644 (file)
@@ -82,7 +82,7 @@ static int gettok() {
       LastChar = getchar();
     } while (isdigit(LastChar) || LastChar == '.');
 
-    NumVal = strtod(NumStr.c_str(), 0);
+    NumVal = strtod(NumStr.c_str(), nullptr);
     return tok_number;
   }
 
@@ -242,6 +242,7 @@ std::unique_ptr<ExprAST> Error(const char *Str) {
   fprintf(stderr, "Error: %s\n", Str);
   return nullptr;
 }
+
 std::unique_ptr<PrototypeAST> ErrorP(const char *Str) {
   Error(Str);
   return nullptr;