r349669 - PR40096: Forwards-compatible with C++20 rule regarding aggregates not having user-declared ctors

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 19 11:33:35 PST 2018


Author: dblaikie
Date: Wed Dec 19 11:33:35 2018
New Revision: 349669

URL: http://llvm.org/viewvc/llvm-project?rev=349669&view=rev
Log:
PR40096: Forwards-compatible with C++20 rule regarding aggregates not having user-declared ctors

Looks like these were in place to make these types move-only. That's
generally not a feature that the type should prescribe (unless it's an
inherent limitation) - instead leaving it up to the users of a type.

Modified:
    cfe/trunk/lib/Tooling/Refactoring/ASTSelection.cpp
    cfe/trunk/tools/clang-refactor/TestSupport.h

Modified: cfe/trunk/lib/Tooling/Refactoring/ASTSelection.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Refactoring/ASTSelection.cpp?rev=349669&r1=349668&r2=349669&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/Refactoring/ASTSelection.cpp (original)
+++ cfe/trunk/lib/Tooling/Refactoring/ASTSelection.cpp Wed Dec 19 11:33:35 2018
@@ -250,8 +250,6 @@ static bool hasAnyDirectChildrenWithKind
 
 namespace {
 struct SelectedNodeWithParents {
-  SelectedNodeWithParents(SelectedNodeWithParents &&) = default;
-  SelectedNodeWithParents &operator=(SelectedNodeWithParents &&) = default;
   SelectedASTNode::ReferenceType Node;
   llvm::SmallVector<SelectedASTNode::ReferenceType, 8> Parents;
 

Modified: cfe/trunk/tools/clang-refactor/TestSupport.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-refactor/TestSupport.h?rev=349669&r1=349668&r2=349669&view=diff
==============================================================================
--- cfe/trunk/tools/clang-refactor/TestSupport.h (original)
+++ cfe/trunk/tools/clang-refactor/TestSupport.h Wed Dec 19 11:33:35 2018
@@ -59,9 +59,6 @@ struct TestSelectionRangesInFile {
   };
   std::vector<RangeGroup> GroupedRanges;
 
-  TestSelectionRangesInFile(TestSelectionRangesInFile &&) = default;
-  TestSelectionRangesInFile &operator=(TestSelectionRangesInFile &&) = default;
-
   bool foreachRange(const SourceManager &SM,
                     llvm::function_ref<void(SourceRange)> Callback) const;
 




More information about the cfe-commits mailing list