From: Dmitri Gribenko Date: Sat, 15 Sep 2012 19:23:53 +0000 (+0000) Subject: Address a long-standing FIXME: remove an unused copy constructor and make X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d11aa850a955027578ff47ab7e266ccf9173b5c2;p=clang Address a long-standing FIXME: remove an unused copy constructor and make UnqualifiedId() properly noncopyable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163981 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Sema/DeclSpec.h b/include/clang/Sema/DeclSpec.h index 9723a43c91..4fb6e4fae6 100644 --- a/include/clang/Sema/DeclSpec.h +++ b/include/clang/Sema/DeclSpec.h @@ -783,8 +783,9 @@ private: /// \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 @@ public: 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() {