[TableGen] Do not construct string from nullptr
authorYuriy Chernyshov <georgthegreat@gmail.com>
Thu, 10 Sep 2020 14:40:40 +0000 (16:40 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 10 Sep 2020 14:42:11 +0000 (16:42 +0200)
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

llvm/utils/TableGen/DFAEmitter.cpp

index 7391f68..e877650 100644 (file)
@@ -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) {}