From 0841916e87a39e3c223c986e8da31e4a9a1432e3 Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Thu, 10 Sep 2020 16:40:40 +0200 Subject: [PATCH] [TableGen] Do not construct string from nullptr 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/utils/TableGen/DFAEmitter.cpp b/llvm/utils/TableGen/DFAEmitter.cpp index 7391f68..e877650 100644 --- a/llvm/utils/TableGen/DFAEmitter.cpp +++ b/llvm/utils/TableGen/DFAEmitter.cpp @@ -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) {} -- 2.7.4