Author: rsmith
Date: Tue Sep 13 13:35:34 2016
New Revision: 281363

URL: http://llvm.org/viewvc/llvm-project?rev=281363&view=rev
Log:
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).

Modified:
    cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp

Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp?rev=281363&r1=281362&r2=281363&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp Tue Sep 13 13:35:34 
2016
@@ -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() {}
   };


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to