projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Clang-tidy modernize-use-nullptr warnings in examples and include directories...
[oota-llvm.git]
/
examples
/
Kaleidoscope
/
Chapter5
/
toy.cpp
diff --git
a/examples/Kaleidoscope/Chapter5/toy.cpp
b/examples/Kaleidoscope/Chapter5/toy.cpp
index 57edf1aa8454da358aad51847fcfe7d9512ee154..eeca4775eeb11698617b88fa8b2275dee9b1cdb7 100644
(file)
--- a/
examples/Kaleidoscope/Chapter5/toy.cpp
+++ b/
examples/Kaleidoscope/Chapter5/toy.cpp
@@
-82,7
+82,7
@@
static int gettok() {
LastChar = getchar();
} while (isdigit(LastChar) || LastChar == '.');
LastChar = getchar();
} while (isdigit(LastChar) || LastChar == '.');
- NumVal = strtod(NumStr.c_str(),
0
);
+ NumVal = strtod(NumStr.c_str(),
nullptr
);
return tok_number;
}
return tok_number;
}
@@
-242,6
+242,7
@@
std::unique_ptr<ExprAST> Error(const char *Str) {
fprintf(stderr, "Error: %s\n", Str);
return nullptr;
}
fprintf(stderr, "Error: %s\n", Str);
return nullptr;
}
+
std::unique_ptr<PrototypeAST> ErrorP(const char *Str) {
Error(Str);
return nullptr;
std::unique_ptr<PrototypeAST> ErrorP(const char *Str) {
Error(Str);
return nullptr;