From ffa0241a03f917405634a744793a48877dfc22de Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 13 Sep 2016 18:35:34 +0000 Subject: [PATCH] Work around a GCC 4.7-specific issue: due to implementing older rules for implicit declarations of move operations, GCC 4.7 would find that SelectPiece has neither a move constructor nor a copy constructor. The copy constructor was (correctly) deleted because the class has a member of move-only type, and the move constructor was (incorrectly, per current C++ rules) not provided because the class has a copy-only base class (in turn because it explicitly declares a destructor). llvm-svn: 281363 --- clang/utils/TableGen/ClangDiagnosticsEmitter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp b/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp index dafb93158abd..d6881ae3074a 100644 --- a/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp +++ b/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp @@ -910,6 +910,11 @@ namespace { /// Diagnostic text, parsed into pieces. struct DiagText { struct Piece { + // This type and its derived classes are move-only. + Piece() = default; + Piece(Piece &&O) = default; + Piece &operator=(Piece &&O) = default; + virtual void print(std::vector &RST) = 0; virtual ~Piece() {} };