diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-09-13 18:35:34 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-09-13 18:35:34 +0000 |
commit | 087efca9e5fcaee0709b56784efe2cbeccaed492 (patch) | |
tree | 2d7906fce9df205bfaf2717c992cfc94752917f3 /utils | |
parent | 1286300e382671aaf0680870ca41c06cc1ea53a4 (diff) |
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/ClangDiagnosticsEmitter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/TableGen/ClangDiagnosticsEmitter.cpp b/utils/TableGen/ClangDiagnosticsEmitter.cpp index dafb93158a..d6881ae307 100644 --- a/utils/TableGen/ClangDiagnosticsEmitter.cpp +++ b/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<std::string> &RST) = 0; virtual ~Piece() {} }; |