[cfe-commits] r163981 - /cfe/trunk/include/clang/Sema/DeclSpec.h

Dmitri Gribenko gribozavr at gmail.com
Sat Sep 15 12:23:53 PDT 2012


Author: gribozavr
Date: Sat Sep 15 14:23:53 2012
New Revision: 163981

URL: http://llvm.org/viewvc/llvm-project?rev=163981&view=rev
Log:
Address a long-standing FIXME: remove an unused copy constructor and make
UnqualifiedId() properly noncopyable.

Modified:
    cfe/trunk/include/clang/Sema/DeclSpec.h

Modified: cfe/trunk/include/clang/Sema/DeclSpec.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/DeclSpec.h?rev=163981&r1=163980&r2=163981&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/DeclSpec.h (original)
+++ cfe/trunk/include/clang/Sema/DeclSpec.h Sat Sep 15 14:23:53 2012
@@ -783,8 +783,9 @@
 /// \brief Represents a C++ unqualified-id that has been parsed. 
 class UnqualifiedId {
 private:
-  const UnqualifiedId &operator=(const UnqualifiedId &); // DO NOT IMPLEMENT
-  
+  UnqualifiedId(const UnqualifiedId &Other) LLVM_DELETED_FUNCTION;
+  const UnqualifiedId &operator=(const UnqualifiedId &) LLVM_DELETED_FUNCTION;
+
 public:
   /// \brief Describes the kind of unqualified-id parsed.
   enum IdKind {
@@ -859,17 +860,6 @@
   
   UnqualifiedId() : Kind(IK_Identifier), Identifier(0) { }
 
-  /// \brief Do not use this copy constructor. It is temporary, and only
-  /// exists because we are holding FieldDeclarators in a SmallVector when we
-  /// don't actually need them.
-  ///
-  /// FIXME: Kill this copy constructor.
-  UnqualifiedId(const UnqualifiedId &Other) 
-    : Kind(IK_Identifier), Identifier(Other.Identifier), 
-      StartLocation(Other.StartLocation), EndLocation(Other.EndLocation) {
-    assert(Other.Kind == IK_Identifier && "Cannot copy non-identifiers");
-  }
-
   /// \brief Clear out this unqualified-id, setting it to default (invalid) 
   /// state.
   void clear() {





More information about the cfe-commits mailing list