]> granicus.if.org Git - clang/commitdiff
Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.
authorDmitri Gribenko <gribozavr@gmail.com>
Sat, 15 Sep 2012 20:20:27 +0000 (20:20 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Sat, 15 Sep 2012 20:20:27 +0000 (20:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163983 91177308-0d34-0410-b5e6-96231b3b80d8

38 files changed:
include/clang/AST/ASTContext.h
include/clang/AST/DeclObjC.h
include/clang/AST/Expr.h
include/clang/AST/RecordLayout.h
include/clang/AST/Type.h
include/clang/ASTMatchers/ASTMatchersInternal.h
include/clang/Basic/Diagnostic.h
include/clang/Basic/IdentifierTable.h
include/clang/Driver/Arg.h
include/clang/Driver/ArgList.h
include/clang/Frontend/ASTUnit.h
include/clang/Frontend/CompilerInstance.h
include/clang/Frontend/VerifyDiagnosticConsumer.h
include/clang/Lex/HeaderMap.h
include/clang/Lex/Lexer.h
include/clang/Lex/PTHLexer.h
include/clang/Lex/PreprocessorLexer.h
include/clang/Lex/TokenLexer.h
include/clang/Parse/Parser.h
include/clang/Rewrite/Core/DeltaTree.h
include/clang/Rewrite/Core/RewriteRope.h
include/clang/Rewrite/Core/TokenRewriter.h
include/clang/Sema/CodeCompleteConsumer.h
include/clang/Sema/DeclSpec.h
include/clang/Sema/DelayedDiagnostic.h
include/clang/Sema/Sema.h
include/clang/Sema/TemplateDeduction.h
include/clang/Serialization/ASTReader.h
include/clang/Serialization/ContinuousRangeMap.h
include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
lib/AST/RecordLayoutBuilder.cpp
lib/CodeGen/CGRecordLayout.h
lib/CodeGen/CodeGenFunction.h
lib/CodeGen/CodeGenModule.h
lib/Parse/RAIIObjectsForParser.h
lib/Serialization/ASTReaderDecl.cpp
tools/libclang/IndexingContext.h

index 3c283bc8f5c8a3b4c136b9e3b9d139bbee16120e..eeaba7a71da97e9e9ad8606346f856f77e815986 100644 (file)
@@ -2027,8 +2027,8 @@ public:
   static unsigned NumImplicitDestructorsDeclared;
   
 private:
-  ASTContext(const ASTContext&); // DO NOT IMPLEMENT
-  void operator=(const ASTContext&); // DO NOT IMPLEMENT
+  ASTContext(const ASTContext &) LLVM_DELETED_FUNCTION;
+  void operator=(const ASTContext &) LLVM_DELETED_FUNCTION;
 
 public:
   /// \brief Initialize built-in types.
index 855fe69461b7b7513fc1f0881fa57f63e39b050a..9e0130ad1651ee40e6ccc0281f48e3295a9274b3 100644 (file)
@@ -33,8 +33,8 @@ class ObjCPropertyImplDecl;
 class CXXCtorInitializer;
 
 class ObjCListBase {
-  void operator=(const ObjCListBase &);     // DO NOT IMPLEMENT
-  ObjCListBase(const ObjCListBase&);        // DO NOT IMPLEMENT
+  ObjCListBase(const ObjCListBase &) LLVM_DELETED_FUNCTION;
+  void operator=(const ObjCListBase &) LLVM_DELETED_FUNCTION;
 protected:
   /// List is an array of pointers to objects that are not owned by this object.
   void **List;
index e5c924d8db12122b45b7c66b53e604dcfbc9bf87..d97c37aa5965956da02414aa36b0c74a0d07e284 100644 (file)
@@ -1132,8 +1132,8 @@ class APNumericStorage {
 
   bool hasAllocation() const { return llvm::APInt::getNumWords(BitWidth) > 1; }
 
-  APNumericStorage(const APNumericStorage&); // do not implement
-  APNumericStorage& operator=(const APNumericStorage&); // do not implement
+  APNumericStorage(const APNumericStorage &) LLVM_DELETED_FUNCTION;
+  void operator=(const APNumericStorage &) LLVM_DELETED_FUNCTION;
 
 protected:
   APNumericStorage() : VAL(0), BitWidth(0) { }
index 3a870d057badcbbe7bc9907ba8bddae4b8875895..36556469eaf85e9a8423080e73b9ec07fa0453e5 100644 (file)
@@ -136,8 +136,8 @@ private:
 
   void Destroy(ASTContext &Ctx);
   
-  ASTRecordLayout(const ASTRecordLayout&);   // DO NOT IMPLEMENT
-  void operator=(const ASTRecordLayout&); // DO NOT IMPLEMENT
+  ASTRecordLayout(const ASTRecordLayout &) LLVM_DELETED_FUNCTION;
+  void operator=(const ASTRecordLayout &) LLVM_DELETED_FUNCTION;
 public:
 
   /// getAlignment - Get the record alignment in characters.
index 2d99a8c2ef73fdd2786adcf4f2e541ba4471dce5..7811be0e832b097f1fa42f42f630d3c9bdc69508 100644 (file)
@@ -1181,8 +1181,8 @@ public:
   };
 
 private:
-  Type(const Type&);           // DO NOT IMPLEMENT.
-  void operator=(const Type&); // DO NOT IMPLEMENT.
+  Type(const Type &) LLVM_DELETED_FUNCTION;
+  void operator=(const Type &) LLVM_DELETED_FUNCTION;
 
   /// Bitfields required by the Type class.
   class TypeBitfields {
index 9e04bd7e7ba81888ea576140a9c166a881cd7e07..38ffb2de75731c836bd750ebb5660b86d1d8d09e 100644 (file)
@@ -174,8 +174,8 @@ public:
   BoundNodesTree build() const;
 
 private:
-  BoundNodesTreeBuilder(const BoundNodesTreeBuilder&);  // DO NOT IMPLEMENT
-  void operator=(const BoundNodesTreeBuilder&);  // DO NOT IMPLEMENT
+  BoundNodesTreeBuilder(const BoundNodesTreeBuilder &) LLVM_DELETED_FUNCTION;
+  void operator=(const BoundNodesTreeBuilder &) LLVM_DELETED_FUNCTION;
 
   BoundNodesMap Bindings;
 
index 3997fb89ba8207ef7a58397e707c83b3070c3788..b7cfa38685b3e78e30366b05866f338e57a8234c 100644 (file)
@@ -837,7 +837,7 @@ class DiagnosticBuilder {
   /// call to ForceEmit.
   mutable bool IsForceEmit;
 
-  void operator=(const DiagnosticBuilder&); // DO NOT IMPLEMENT
+  void operator=(const DiagnosticBuilder &) LLVM_DELETED_FUNCTION;
   friend class DiagnosticsEngine;
   
   DiagnosticBuilder()
index dc6acdaa91ae9a2d5812356b9ba39138bec03de0..d77c870ec559bf3d52ca7ff878747f244af92a2c 100644 (file)
@@ -346,8 +346,8 @@ public:
 /// actual functionality.
 class IdentifierIterator {
 private:
-  IdentifierIterator(const IdentifierIterator&); // Do not implement
-  IdentifierIterator &operator=(const IdentifierIterator&); // Do not implement
+  IdentifierIterator(const IdentifierIterator &) LLVM_DELETED_FUNCTION;
+  void operator=(const IdentifierIterator &) LLVM_DELETED_FUNCTION;
 
 protected:
   IdentifierIterator() { }
@@ -695,8 +695,8 @@ public:
 /// multi-keyword caching.
 class SelectorTable {
   void *Impl;  // Actually a SelectorTableImpl
-  SelectorTable(const SelectorTable&); // DISABLED: DO NOT IMPLEMENT
-  void operator=(const SelectorTable&); // DISABLED: DO NOT IMPLEMENT
+  SelectorTable(const SelectorTable &) LLVM_DELETED_FUNCTION;
+  void operator=(const SelectorTable &) LLVM_DELETED_FUNCTION;
 public:
   SelectorTable();
   ~SelectorTable();
index e466cc323173a02280b7d9b9c5ff7c4568c492c2..149f39a74d8ebf5eb7c1e87f17d4b7da041e3f5c 100644 (file)
@@ -33,8 +33,8 @@ namespace driver {
   /// ArgList to provide efficient iteration over all instances of a
   /// particular option.
   class Arg {
-    Arg(const Arg &); // DO NOT IMPLEMENT
-    void operator=(const Arg &); // DO NOT IMPLEMENT
+    Arg(const Arg &) LLVM_DELETED_FUNCTION;
+    void operator=(const Arg &) LLVM_DELETED_FUNCTION;
 
   private:
     /// \brief The option this argument is an instance of.
index ce0c79eb977e180b7576ffe198c53d7187ccb174..b2570b01dd4633ee620cfc66ab71852f1df3f4ae 100644 (file)
@@ -94,8 +94,8 @@ namespace driver {
   /// and to iterate over groups of arguments.
   class ArgList {
   private:
-    ArgList(const ArgList &); // DO NOT IMPLEMENT
-    void operator=(const ArgList &); // DO NOT IMPLEMENT
+    ArgList(const ArgList &) LLVM_DELETED_FUNCTION;
+    void operator=(const ArgList &) LLVM_DELETED_FUNCTION;
 
   public:
     typedef SmallVector<Arg*, 16> arglist_type;
index df16762beaef4a3fa0b47bcce9fd5c0b9f3af226..9e4db4413d0e6398bc897fb52ae380a3f44da560 100644 (file)
@@ -374,8 +374,8 @@ private:
   /// \brief Clear out and deallocate 
   void ClearCachedCompletionResults();
   
-  ASTUnit(const ASTUnit&); // DO NOT IMPLEMENT
-  ASTUnit &operator=(const ASTUnit &); // DO NOT IMPLEMENT
+  ASTUnit(const ASTUnit &) LLVM_DELETED_FUNCTION;
+  void operator=(const ASTUnit &) LLVM_DELETED_FUNCTION;
   
   explicit ASTUnit(bool MainFileIsAST);
 
index c819b41314e99df31a58ea90b2343dc3a84886fb..149735d183bfc3b1d1c5ae03b665a0ccef8b4bf3 100644 (file)
@@ -130,8 +130,8 @@ class CompilerInstance : public ModuleLoader {
   /// The list of active output files.
   std::list<OutputFile> OutputFiles;
 
-  void operator=(const CompilerInstance &);  // DO NOT IMPLEMENT
-  CompilerInstance(const CompilerInstance&); // DO NOT IMPLEMENT
+  CompilerInstance(const CompilerInstance &) LLVM_DELETED_FUNCTION;
+  void operator=(const CompilerInstance &) LLVM_DELETED_FUNCTION;
 public:
   CompilerInstance();
   ~CompilerInstance();
index bc39bba0a9d57e68fa22cee4a3b711bdc7be08c3..bf27eeea36b01be6628236275a8081b0987fe70e 100644 (file)
@@ -146,8 +146,8 @@ public:
     }
 
   private:
-    Directive(const Directive&); // DO NOT IMPLEMENT
-    void operator=(const Directive&); // DO NOT IMPLEMENT
+    Directive(const Directive &) LLVM_DELETED_FUNCTION;
+    void operator=(const Directive &) LLVM_DELETED_FUNCTION;
   };
 
   typedef std::vector<Directive*> DirectiveList;
index 107408dced10694f4bd1b8ef7c76e262949cb5a0..8473a6a4e752eb5e2110821c28f30cf5ed323a11 100644 (file)
@@ -15,6 +15,7 @@
 #define LLVM_CLANG_LEX_HEADERMAP_H
 
 #include "clang/Basic/LLVM.h"
+#include "llvm/Support/Compiler.h"
 
 namespace llvm {
   class MemoryBuffer;
@@ -30,8 +31,8 @@ namespace clang {
 /// symlinks to files.  Its advantages are that it is dense and more efficient
 /// to create and process than a directory of symlinks.
 class HeaderMap {
-  HeaderMap(const HeaderMap&); // DO NOT IMPLEMENT
-  void operator=(const HeaderMap&); // DO NOT IMPLEMENT
+  HeaderMap(const HeaderMap &) LLVM_DELETED_FUNCTION;
+  void operator=(const HeaderMap &) LLVM_DELETED_FUNCTION;
 
   const llvm::MemoryBuffer *FileBuffer;
   bool NeedsBSwap;
index 31110f9e569e8eb883519121e0ab72d140f67c61..fc3896ccd41cde42beda0cea738d2b91eb6a3c73 100644 (file)
@@ -83,8 +83,8 @@ class Lexer : public PreprocessorLexer {
   // CurrentConflictMarkerState - The kind of conflict marker we are handling.
   ConflictMarkerKind CurrentConflictMarkerState;
 
-  Lexer(const Lexer&);          // DO NOT IMPLEMENT
-  void operator=(const Lexer&); // DO NOT IMPLEMENT
+  Lexer(const Lexer &) LLVM_DELETED_FUNCTION;
+  void operator=(const Lexer &) LLVM_DELETED_FUNCTION;
   friend class Preprocessor;
 
   void InitLexer(const char *BufStart, const char *BufPtr, const char *BufEnd);
index f6a97a0a90a434448c730e266a00ef857f1bcd40..a9276e86b7260542bd89149847352a407677d942 100644 (file)
@@ -44,8 +44,8 @@ class PTHLexer : public PreprocessorLexer {
   ///  to process when doing quick skipping of preprocessor blocks.
   const unsigned char* CurPPCondPtr;
 
-  PTHLexer(const PTHLexer&);  // DO NOT IMPLEMENT
-  void operator=(const PTHLexer&); // DO NOT IMPLEMENT
+  PTHLexer(const PTHLexer &) LLVM_DELETED_FUNCTION;
+  void operator=(const PTHLexer &) LLVM_DELETED_FUNCTION;
 
   /// ReadToken - Used by PTHLexer to read tokens TokBuf.
   void ReadToken(Token& T);
index 8a0b3cf51accb282563a8573d75a34669a48990e..20fb8a0c48041199fee26c6f28bf9621f7a3c46a 100644 (file)
@@ -69,8 +69,8 @@ protected:
   /// we are currently in.
   SmallVector<PPConditionalInfo, 4> ConditionalStack;
 
-  PreprocessorLexer(const PreprocessorLexer&);          // DO NOT IMPLEMENT
-  void operator=(const PreprocessorLexer&); // DO NOT IMPLEMENT
+  PreprocessorLexer(const PreprocessorLexer &) LLVM_DELETED_FUNCTION;
+  void operator=(const PreprocessorLexer &) LLVM_DELETED_FUNCTION;
   friend class Preprocessor;
 
   PreprocessorLexer(Preprocessor *pp, FileID fid);
index e205bec5531eac569b23ba548bd02a400c3387c7..090402a811e231e8a28e2e6270c5e8a50520f2fa 100644 (file)
@@ -91,8 +91,8 @@ class TokenLexer {
   /// should not be subject to further macro expansion.
   bool DisableMacroExpansion : 1;
 
-  TokenLexer(const TokenLexer&);  // DO NOT IMPLEMENT
-  void operator=(const TokenLexer&); // DO NOT IMPLEMENT
+  TokenLexer(const TokenLexer &) LLVM_DELETED_FUNCTION;
+  void operator=(const TokenLexer &) LLVM_DELETED_FUNCTION;
 public:
   /// Create a TokenLexer for the specified macro with the specified actual
   /// arguments.  Note that this ctor takes ownership of the ActualArgs pointer.
index dfe9c28a40dd4d0cf04f08f4c602a6a005e90050..c35f1e77d231ccfb8192e212728f1b7a735d1a51 100644 (file)
@@ -655,8 +655,8 @@ private:
   /// the parser will exit the scope.
   class ParseScope {
     Parser *Self;
-    ParseScope(const ParseScope&); // do not implement
-    ParseScope& operator=(const ParseScope&); // do not implement
+    ParseScope(const ParseScope &) LLVM_DELETED_FUNCTION;
+    void operator=(const ParseScope &) LLVM_DELETED_FUNCTION;
 
   public:
     // ParseScope - Construct a new object to manage a scope in the
@@ -695,8 +695,8 @@ private:
   class ParseScopeFlags {
     Scope *CurScope;
     unsigned OldFlags;
-    ParseScopeFlags(const ParseScopeFlags &); // do not implement
-    void operator=(const ParseScopeFlags &); // do not implement
+    ParseScopeFlags(const ParseScopeFlags &) LLVM_DELETED_FUNCTION;
+    void operator=(const ParseScopeFlags &) LLVM_DELETED_FUNCTION;
 
   public:
     ParseScopeFlags(Parser *Self, unsigned ScopeFlags, bool ManageFlags = true);
index f32906a323e06b560c580727a23e8a1cbcbc05c0..a6109bf90157ab15251a13c3d8f19b44cc31f9c4 100644 (file)
@@ -14,6 +14,8 @@
 #ifndef CLANG_REWRITE_DELTATREE_H
 #define CLANG_REWRITE_DELTATREE_H
 
+#include "llvm/Support/Compiler.h"
+
 namespace clang {
 
   /// DeltaTree - a multiway search tree (BTree) structure with some fancy
@@ -25,7 +27,7 @@ namespace clang {
   /// as well, without traversing the whole tree.
   class DeltaTree {
     void *Root;    // "DeltaTreeNode *"
-    void operator=(const DeltaTree&); // DO NOT IMPLEMENT
+    void operator=(const DeltaTree &) LLVM_DELETED_FUNCTION;
   public:
     DeltaTree();
 
index bae8fb7a508634e46ff75862ca55e341b252e6c8..9f1bbe501318f6a8279a46ce18ab300a110990c5 100644 (file)
@@ -14,6 +14,8 @@
 #ifndef LLVM_CLANG_REWRITEROPE_H
 #define LLVM_CLANG_REWRITEROPE_H
 
+#include "llvm/Support/Compiler.h"
+
 #include <cstring>
 #include <cassert>
 #include <cstddef>
@@ -153,7 +155,7 @@ namespace clang {
 
   class RopePieceBTree {
     void /*RopePieceBTreeNode*/ *Root;
-    void operator=(const RopePieceBTree &); // DO NOT IMPLEMENT
+    void operator=(const RopePieceBTree &) LLVM_DELETED_FUNCTION;
   public:
     RopePieceBTree();
     RopePieceBTree(const RopePieceBTree &RHS);
index 894db0953f7fd6806cbc113f7a8b90371fb3b6ee..ec0bb5ba082749c7f156a0f84cffff69dc7d3e2d 100644 (file)
@@ -43,8 +43,8 @@ namespace clang {
     ///
     OwningPtr<ScratchBuffer> ScratchBuf;
 
-    TokenRewriter(const TokenRewriter&);  // DO NOT IMPLEMENT
-    void operator=(const TokenRewriter&); // DO NOT IMPLEMENT.
+    TokenRewriter(const TokenRewriter &) LLVM_DELETED_FUNCTION;
+    void operator=(const TokenRewriter &) LLVM_DELETED_FUNCTION;
   public:
     /// TokenRewriter - This creates a TokenRewriter for the file with the
     /// specified FileID.
index d43aaafb292445fa32d06424b102c51d01181f0d..90ed2cefb4b5075e7f0bf38ad92b31e90896a9d5 100644 (file)
@@ -450,8 +450,8 @@ private:
   /// entity being completed by this result.
   const char *BriefComment;
   
-  CodeCompletionString(const CodeCompletionString &); // DO NOT IMPLEMENT
-  CodeCompletionString &operator=(const CodeCompletionString &); // DITTO
+  CodeCompletionString(const CodeCompletionString &) LLVM_DELETED_FUNCTION;
+  void operator=(const CodeCompletionString &) LLVM_DELETED_FUNCTION;
 
   CodeCompletionString(const Chunk *Chunks, unsigned NumChunks,
                        unsigned Priority, CXAvailabilityKind Availability,
index 4fb6e4fae6fe7caa3a7f803862f42af4d21379ec..b16d5f8805d6791169a6e72320e95e0b81ef0508 100644 (file)
@@ -383,8 +383,8 @@ private:
             T == TST_class);
   }
 
-  DeclSpec(const DeclSpec&);       // DO NOT IMPLEMENT
-  void operator=(const DeclSpec&); // DO NOT IMPLEMENT
+  DeclSpec(const DeclSpec &) LLVM_DELETED_FUNCTION;
+  void operator=(const DeclSpec &) LLVM_DELETED_FUNCTION;
 public:
 
   DeclSpec(AttributeFactory &attrFactory)
index c241266c9b8dab755a5c125c87445296606ca167..1ee8a0dc769b632084e5b601548a751ca5c12e54 100644 (file)
@@ -220,9 +220,8 @@ class DelayedDiagnosticPool {
   const DelayedDiagnosticPool *Parent;
   llvm::SmallVector<DelayedDiagnostic, 4> Diagnostics;
 
-  // Do not implement.
-  DelayedDiagnosticPool(const DelayedDiagnosticPool &other);
-  DelayedDiagnosticPool &operator=(const DelayedDiagnosticPool &other);
+  DelayedDiagnosticPool(const DelayedDiagnosticPool &) LLVM_DELETED_FUNCTION;
+  void operator=(const DelayedDiagnosticPool &) LLVM_DELETED_FUNCTION;
 public:
   DelayedDiagnosticPool(const DelayedDiagnosticPool *parent) : Parent(parent) {}
   ~DelayedDiagnosticPool() {
index aec76b18484970a96e012883acd0918b32afebbe..2cd4688ce587591d22bbb0cbfc1f11074d319e26 100644 (file)
@@ -187,8 +187,8 @@ typedef std::pair<llvm::PointerUnion<const TemplateTypeParmType*, NamedDecl*>,
 
 /// Sema - This implements semantic analysis and AST building for C.
 class Sema {
-  Sema(const Sema&);           // DO NOT IMPLEMENT
-  void operator=(const Sema&); // DO NOT IMPLEMENT
+  Sema(const Sema &) LLVM_DELETED_FUNCTION;
+  void operator=(const Sema &) LLVM_DELETED_FUNCTION;
   mutable const TargetAttributesSema* TheTargetAttributesSema;
 public:
   typedef OpaquePtr<DeclGroupRef> DeclGroupPtrTy;
index 4c2d876d1f87754e2033a8cfe7d09155c8f4a022..f785e6ce217fbfb36278dd290f55738b3f9f8f39 100644 (file)
@@ -46,9 +46,8 @@ class TemplateDeductionInfo {
   /// SFINAE while performing template argument deduction.
   SmallVector<PartialDiagnosticAt, 4> SuppressedDiagnostics;
 
-  // do not implement these
-  TemplateDeductionInfo(const TemplateDeductionInfo&);
-  TemplateDeductionInfo &operator=(const TemplateDeductionInfo&);
+  TemplateDeductionInfo(const TemplateDeductionInfo &) LLVM_DELETED_FUNCTION;
+  void operator=(const TemplateDeductionInfo &) LLVM_DELETED_FUNCTION;
 
 public:
   TemplateDeductionInfo(ASTContext &Context, SourceLocation Loc)
index 3044504a927a1a8b9425a06c3d6853f31b96fc31..51db35e4d96b128eace3fd4404361b6e3332268b 100644 (file)
@@ -758,8 +758,8 @@ private:
     ASTReader &Reader;
     enum ReadingKind PrevKind;
 
-    ReadingKindTracker(const ReadingKindTracker&); // do not implement
-    ReadingKindTracker &operator=(const ReadingKindTracker&);// do not implement
+    ReadingKindTracker(const ReadingKindTracker &) LLVM_DELETED_FUNCTION;
+    void operator=(const ReadingKindTracker &) LLVM_DELETED_FUNCTION;
 
   public:
     ReadingKindTracker(enum ReadingKind newKind, ASTReader &reader)
@@ -862,8 +862,8 @@ private:
   void Error(unsigned DiagID, StringRef Arg1 = StringRef(),
              StringRef Arg2 = StringRef());
 
-  ASTReader(const ASTReader&); // do not implement
-  ASTReader &operator=(const ASTReader &); // do not implement
+  ASTReader(const ASTReader &) LLVM_DELETED_FUNCTION;
+  void operator=(const ASTReader &) LLVM_DELETED_FUNCTION;
 public:
   /// \brief Load the AST file and validate its contents against the given
   /// Preprocessor.
index f368a80a97d828562cef7cb0628b8f30389a8d7b..d89cd02903d63a4b92afb473b9b97eec406d40bd 100644 (file)
@@ -108,8 +108,8 @@ public:
   class Builder {
     ContinuousRangeMap &Self;
     
-    Builder(const Builder&); // DO NOT IMPLEMENT
-    Builder &operator=(const Builder&); // DO NOT IMPLEMENT
+    Builder(const Builder&) LLVM_DELETED_FUNCTION;
+    Builder &operator=(const Builder&) LLVM_DELETED_FUNCTION;
     
   public:
     explicit Builder(ContinuousRangeMap &Self) : Self(Self) { }
index 7cbeb201c708e07e5658e91778e32f96220e6d5a..9dc9491cfdc1a400887e1551cec22f3673684b0d 100644 (file)
@@ -120,8 +120,7 @@ private:
   const LocationContext *LCtx;
   llvm::PointerUnion<const Expr *, const Decl *> Origin;
 
-  // DO NOT IMPLEMENT
-  CallEvent &operator=(const CallEvent &);
+  void operator=(const CallEvent &) LLVM_DELETED_FUNCTION;
 
 protected:
   // This is user data for subclasses.
index 506debe0a0f03661ce080c36fc2767b9e6827623..d3f87b7d33031763762a197292cbcc91a04415c0 100644 (file)
@@ -97,8 +97,8 @@ private:
                     ExplodedNode *Pred);
 
 private:
-  CoreEngine(const CoreEngine&); // Do not implement.
-  CoreEngine& operator=(const CoreEngine&);
+  CoreEngine(const CoreEngine &) LLVM_DELETED_FUNCTION;
+  void operator=(const CoreEngine &) LLVM_DELETED_FUNCTION;
 
   ExplodedNode *generateCallExitBeginNode(ExplodedNode *N);
 
index 6581df40468265a3e920509d3314834e6e2d65e1..fc7586cffd681335df1ef3e01c1f92291a75e626 100644 (file)
@@ -789,8 +789,8 @@ protected:
   void setDataSize(CharUnits NewSize) { DataSize = Context.toBits(NewSize); }
   void setDataSize(uint64_t NewSize) { DataSize = NewSize; }
 
-  RecordLayoutBuilder(const RecordLayoutBuilder&);   // DO NOT IMPLEMENT
-  void operator=(const RecordLayoutBuilder&); // DO NOT IMPLEMENT
+  RecordLayoutBuilder(const RecordLayoutBuilder &) LLVM_DELETED_FUNCTION;
+  void operator=(const RecordLayoutBuilder &) LLVM_DELETED_FUNCTION;
 public:
   static const CXXMethodDecl *ComputeKeyFunction(const CXXRecordDecl *RD);
 };
index 94c822f49f1725d3276082085906c21e36d7e54e..3db5e0483bab538646fd25732c5b3d0a825ceed6 100644 (file)
@@ -166,8 +166,8 @@ public:
 class CGRecordLayout {
   friend class CodeGenTypes;
 
-  CGRecordLayout(const CGRecordLayout&); // DO NOT IMPLEMENT
-  void operator=(const CGRecordLayout&); // DO NOT IMPLEMENT
+  CGRecordLayout(const CGRecordLayout &) LLVM_DELETED_FUNCTION;
+  void operator=(const CGRecordLayout &) LLVM_DELETED_FUNCTION;
 
 private:
   /// The LLVM type corresponding to this record layout; used when
index c9c4a6dbe427357619d9916c4bb8c8a001d5df65..fc930ec158b005c5865065f3b64bc9a055e02462 100644 (file)
@@ -532,8 +532,8 @@ public:
 /// CodeGenFunction - This class organizes the per-function state that is used
 /// while generating LLVM code.
 class CodeGenFunction : public CodeGenTypeCache {
-  CodeGenFunction(const CodeGenFunction&); // DO NOT IMPLEMENT
-  void operator=(const CodeGenFunction&);  // DO NOT IMPLEMENT
+  CodeGenFunction(const CodeGenFunction &) LLVM_DELETED_FUNCTION;
+  void operator=(const CodeGenFunction &) LLVM_DELETED_FUNCTION;
 
   friend class CGCXXABI;
 public:
@@ -794,8 +794,8 @@ public:
     bool OldDidCallStackSave;
     bool PerformCleanup;
 
-    RunCleanupsScope(const RunCleanupsScope &); // DO NOT IMPLEMENT
-    RunCleanupsScope &operator=(const RunCleanupsScope &); // DO NOT IMPLEMENT
+    RunCleanupsScope(const RunCleanupsScope &) LLVM_DELETED_FUNCTION;
+    void operator=(const RunCleanupsScope &) LLVM_DELETED_FUNCTION;
 
   protected:
     CodeGenFunction& CGF;
@@ -838,8 +838,8 @@ public:
     SourceRange Range;
     bool PopDebugStack;
 
-    LexicalScope(const LexicalScope &); // DO NOT IMPLEMENT THESE
-    LexicalScope &operator=(const LexicalScope &);
+    LexicalScope(const LexicalScope &) LLVM_DELETED_FUNCTION;
+    void operator=(const LexicalScope &) LLVM_DELETED_FUNCTION;
 
   public:
     /// \brief Enter a new cleanup scope.
index d6ff50d5ad792f38da9774f3d2f0ba678e5a01ef..6e81693f7fd56b4a3bd3f5583181eeda259cdaf3 100644 (file)
@@ -210,8 +210,8 @@ struct ARCEntrypoints {
 /// CodeGenModule - This class organizes the cross-function state that is used
 /// while generating LLVM code.
 class CodeGenModule : public CodeGenTypeCache {
-  CodeGenModule(const CodeGenModule&);  // DO NOT IMPLEMENT
-  void operator=(const CodeGenModule&); // DO NOT IMPLEMENT
+  CodeGenModule(const CodeGenModule &) LLVM_DELETED_FUNCTION;
+  void operator=(const CodeGenModule &) LLVM_DELETED_FUNCTION;
 
   typedef std::vector<std::pair<llvm::Constant*, int> > CtorList;
 
index 455c4af2ffaec0baa3a2320f955be346f0959b28..060fd206cd7139e1b7f4c3ffe175738504c2f817 100644 (file)
@@ -87,9 +87,8 @@ namespace clang {
     Sema::ParsingDeclState State;
     bool Popped;
 
-    // Do not implement.
-    ParsingDeclRAIIObject(const ParsingDeclRAIIObject &other);
-    ParsingDeclRAIIObject &operator=(const ParsingDeclRAIIObject &other);
+    ParsingDeclRAIIObject(const ParsingDeclRAIIObject &) LLVM_DELETED_FUNCTION;
+    void operator=(const ParsingDeclRAIIObject &) LLVM_DELETED_FUNCTION;
 
   public:
     enum NoParent_t { NoParent };
@@ -245,8 +244,9 @@ namespace clang {
   /// the way they used to be.  This is used to handle __extension__ in the
   /// parser.
   class ExtensionRAIIObject {
-    void operator=(const ExtensionRAIIObject &);     // DO NOT IMPLEMENT
-    ExtensionRAIIObject(const ExtensionRAIIObject&); // DO NOT IMPLEMENT
+    ExtensionRAIIObject(const ExtensionRAIIObject &) LLVM_DELETED_FUNCTION;
+    void operator=(const ExtensionRAIIObject &) LLVM_DELETED_FUNCTION;
+
     DiagnosticsEngine &Diags;
   public:
     ExtensionRAIIObject(DiagnosticsEngine &diags) : Diags(diags) {
index 7aac2ac3ed860f0a56c796b984014d6e9c0be2f9..044d642fb949bbc479c5ddf9ec0b0e76c4eb035a 100644 (file)
@@ -116,7 +116,7 @@ namespace clang {
       GlobalDeclID FirstID;
       mutable bool Owning;
       
-      RedeclarableResult &operator=(RedeclarableResult&); // DO NOT IMPLEMENT
+      void operator=(RedeclarableResult &) LLVM_DELETED_FUNCTION;
       
     public:
       RedeclarableResult(ASTReader &Reader, GlobalDeclID FirstID)
@@ -162,7 +162,7 @@ namespace clang {
       NamedDecl *Existing;
       mutable bool AddResult;
       
-      FindExistingResult &operator=(FindExistingResult&); // DO NOT IMPLEMENT
+      void operator=(FindExistingResult&) LLVM_DELETED_FUNCTION;
       
     public:
       FindExistingResult(ASTReader &Reader)
index ef5ed07e36f0477a7585e4e0427addb90b8bd3a7..be21927c5b1e7a205372837f3181bf292137e620 100644 (file)
@@ -251,8 +251,8 @@ class AttrListInfo {
   SmallVector<CXIdxAttrInfo *, 2> CXAttrs;
   unsigned ref_cnt;
 
-  AttrListInfo(const AttrListInfo&); // DO NOT IMPLEMENT
-  void operator=(const AttrListInfo&); // DO NOT IMPLEMENT
+  AttrListInfo(const AttrListInfo &) LLVM_DELETED_FUNCTION;
+  void operator=(const AttrListInfo &) LLVM_DELETED_FUNCTION;
 public:
   AttrListInfo(const Decl *D, IndexingContext &IdxCtx);