Skip to content

Commit

Permalink
[TableGen] Do not construct string from nullptr
Browse files Browse the repository at this point in the history
While I am trying to forbid such usages systematically in
https://reviews.llvm.org/D79427 / P2166R0 to C++ standard,
this PR fixes this (definitelly incorrect) usage in llvm.

Differential Revision: https://reviews.llvm.org/D87185
  • Loading branch information
georgthegreat authored and nikic committed Sep 10, 2020
1 parent 82edd42 commit 0841916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/utils/TableGen/DFAEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ namespace {
struct Action {
Record *R = nullptr;
unsigned I = 0;
std::string S = nullptr;
std::string S;

Action() = default;
Action(Record *R, unsigned I, std::string S) : R(R), I(I), S(S) {}
Expand Down

0 comments on commit 0841916

Please sign in to comment.