From abc18920577c85c45458ee9de7dfec2d3ee54cef Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Sun, 15 Feb 2015 22:54:08 +0000 Subject: [PATCH] Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; Clang edition. llvm-svn: 229339 --- clang/include/clang/AST/ASTContext.h | 4 ++-- clang/include/clang/AST/CommentCommandTraits.h | 4 ++-- clang/include/clang/AST/CommentLexer.h | 4 ++-- clang/include/clang/AST/CommentParser.h | 4 ++-- clang/include/clang/AST/CommentSema.h | 4 ++-- clang/include/clang/AST/Decl.h | 4 ++-- clang/include/clang/AST/DeclObjC.h | 4 ++-- clang/include/clang/AST/DeclTemplate.h | 6 +++--- clang/include/clang/AST/DeclarationName.h | 4 ++-- clang/include/clang/AST/Expr.h | 4 ++-- clang/include/clang/AST/NestedNameSpecifier.h | 2 +- clang/include/clang/AST/RecordLayout.h | 4 ++-- clang/include/clang/AST/TemplateBase.h | 2 +- clang/include/clang/AST/Type.h | 4 ++-- clang/include/clang/ASTMatchers/Dynamic/Registry.h | 2 +- .../include/clang/Analysis/Analyses/ThreadSafetyCommon.h | 4 ++-- clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h | 8 ++++---- clang/include/clang/Analysis/Analyses/ThreadSafetyUtil.h | 6 +++--- clang/include/clang/Basic/Diagnostic.h | 6 +++--- clang/include/clang/Basic/FileManager.h | 2 +- clang/include/clang/Basic/IdentifierTable.h | 12 ++++++------ clang/include/clang/Basic/SourceManager.h | 6 +++--- clang/include/clang/Frontend/ASTUnit.h | 4 ++-- clang/include/clang/Frontend/CompilerInstance.h | 4 ++-- clang/include/clang/Frontend/CompilerInvocation.h | 2 +- clang/include/clang/Frontend/VerifyDiagnosticConsumer.h | 4 ++-- clang/include/clang/Lex/HeaderMap.h | 4 ++-- clang/include/clang/Lex/HeaderSearch.h | 4 ++-- clang/include/clang/Lex/Lexer.h | 4 ++-- clang/include/clang/Lex/PTHLexer.h | 4 ++-- clang/include/clang/Lex/PTHManager.h | 4 ++-- clang/include/clang/Lex/PreprocessorLexer.h | 4 ++-- clang/include/clang/Lex/TokenLexer.h | 4 ++-- clang/include/clang/Parse/Parser.h | 8 ++++---- clang/include/clang/Rewrite/Core/DeltaTree.h | 2 +- clang/include/clang/Rewrite/Core/RewriteRope.h | 2 +- clang/include/clang/Rewrite/Core/TokenRewriter.h | 4 ++-- clang/include/clang/Sema/AttributeList.h | 10 +++++----- clang/include/clang/Sema/CodeCompleteConsumer.h | 4 ++-- clang/include/clang/Sema/DeclSpec.h | 8 ++++---- clang/include/clang/Sema/DelayedDiagnostic.h | 4 ++-- clang/include/clang/Sema/Overload.h | 4 ++-- clang/include/clang/Sema/Sema.h | 8 ++++---- clang/include/clang/Sema/Template.h | 4 ++-- clang/include/clang/Sema/TemplateDeduction.h | 8 ++++---- clang/include/clang/Serialization/ASTReader.h | 8 ++++---- clang/include/clang/Serialization/ContinuousRangeMap.h | 4 ++-- clang/include/clang/Serialization/GlobalModuleIndex.h | 4 ++-- .../StaticAnalyzer/Core/BugReporter/PathDiagnostic.h | 8 ++++---- .../clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h | 2 +- .../clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h | 4 ++-- .../StaticAnalyzer/Core/PathSensitive/ProgramState.h | 2 +- .../clang/StaticAnalyzer/Core/PathSensitive/SVals.h | 10 +++++----- clang/lib/AST/RecordLayoutBuilder.cpp | 9 ++++----- clang/lib/CodeGen/CGBuilder.h | 2 +- clang/lib/CodeGen/CGCleanup.h | 2 +- clang/lib/CodeGen/CGLoopInfo.h | 4 ++-- clang/lib/CodeGen/CGRecordLayout.h | 4 ++-- clang/lib/CodeGen/CGRecordLayoutBuilder.cpp | 4 ++-- clang/lib/CodeGen/CodeGenFunction.h | 16 ++++++++-------- clang/lib/CodeGen/CodeGenModule.h | 4 ++-- clang/lib/CodeGen/SanitizerMetadata.h | 4 ++-- clang/lib/Format/FormatToken.h | 4 ++-- clang/lib/Format/TokenAnnotator.h | 4 ++-- clang/lib/Parse/RAIIObjectsForParser.h | 8 ++++---- clang/lib/Sema/SemaDeclCXX.cpp | 4 ++-- clang/lib/Serialization/ASTReaderDecl.cpp | 4 ++-- clang/tools/libclang/CXString.h | 2 +- clang/tools/libclang/IndexingContext.h | 4 ++-- clang/unittests/Format/FormatTest.cpp | 2 +- 70 files changed, 165 insertions(+), 166 deletions(-) diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h index 195d748..0bc0330 100644 --- a/clang/include/clang/AST/ASTContext.h +++ b/clang/include/clang/AST/ASTContext.h @@ -2263,8 +2263,8 @@ public: static unsigned NumImplicitDestructorsDeclared; private: - ASTContext(const ASTContext &) LLVM_DELETED_FUNCTION; - void operator=(const ASTContext &) LLVM_DELETED_FUNCTION; + ASTContext(const ASTContext &) = delete; + void operator=(const ASTContext &) = delete; public: /// \brief Initialize built-in types. diff --git a/clang/include/clang/AST/CommentCommandTraits.h b/clang/include/clang/AST/CommentCommandTraits.h index ec6d83c..289f2fd 100644 --- a/clang/include/clang/AST/CommentCommandTraits.h +++ b/clang/include/clang/AST/CommentCommandTraits.h @@ -166,8 +166,8 @@ public: static const CommandInfo *getBuiltinCommandInfo(unsigned CommandID); private: - CommandTraits(const CommandTraits &) LLVM_DELETED_FUNCTION; - void operator=(const CommandTraits &) LLVM_DELETED_FUNCTION; + CommandTraits(const CommandTraits &) = delete; + void operator=(const CommandTraits &) = delete; const CommandInfo *getRegisteredCommandInfo(StringRef Name) const; const CommandInfo *getRegisteredCommandInfo(unsigned CommandID) const; diff --git a/clang/include/clang/AST/CommentLexer.h b/clang/include/clang/AST/CommentLexer.h index d995df9..f190b93 100644 --- a/clang/include/clang/AST/CommentLexer.h +++ b/clang/include/clang/AST/CommentLexer.h @@ -221,8 +221,8 @@ public: /// \brief Comment lexer. class Lexer { private: - Lexer(const Lexer &) LLVM_DELETED_FUNCTION; - void operator=(const Lexer &) LLVM_DELETED_FUNCTION; + Lexer(const Lexer &) = delete; + void operator=(const Lexer &) = delete; /// Allocator for strings that are semantic values of tokens and have to be /// computed (for example, resolved decimal character references). diff --git a/clang/include/clang/AST/CommentParser.h b/clang/include/clang/AST/CommentParser.h index 2c444f0..42bf4c9 100644 --- a/clang/include/clang/AST/CommentParser.h +++ b/clang/include/clang/AST/CommentParser.h @@ -28,8 +28,8 @@ class CommandTraits; /// Doxygen comment parser. class Parser { - Parser(const Parser &) LLVM_DELETED_FUNCTION; - void operator=(const Parser &) LLVM_DELETED_FUNCTION; + Parser(const Parser &) = delete; + void operator=(const Parser &) = delete; friend class TextTokenRetokenizer; diff --git a/clang/include/clang/AST/CommentSema.h b/clang/include/clang/AST/CommentSema.h index 4ae6fe0..9b05d39 100644 --- a/clang/include/clang/AST/CommentSema.h +++ b/clang/include/clang/AST/CommentSema.h @@ -31,8 +31,8 @@ namespace comments { class CommandTraits; class Sema { - Sema(const Sema &) LLVM_DELETED_FUNCTION; - void operator=(const Sema &) LLVM_DELETED_FUNCTION; + Sema(const Sema &) = delete; + void operator=(const Sema &) = delete; /// Allocator for AST nodes. llvm::BumpPtrAllocator &Allocator; diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index ee2f760..63ef796 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -538,8 +538,8 @@ struct QualifierInfo { private: // Copy constructor and copy assignment are disabled. - QualifierInfo(const QualifierInfo&) LLVM_DELETED_FUNCTION; - QualifierInfo& operator=(const QualifierInfo&) LLVM_DELETED_FUNCTION; + QualifierInfo(const QualifierInfo&) = delete; + QualifierInfo& operator=(const QualifierInfo&) = delete; }; /// \brief Represents a ValueDecl that came out of a declarator. diff --git a/clang/include/clang/AST/DeclObjC.h b/clang/include/clang/AST/DeclObjC.h index 55d4b0f..97ce132 100644 --- a/clang/include/clang/AST/DeclObjC.h +++ b/clang/include/clang/AST/DeclObjC.h @@ -33,8 +33,8 @@ class ObjCPropertyImplDecl; class CXXCtorInitializer; class ObjCListBase { - ObjCListBase(const ObjCListBase &) LLVM_DELETED_FUNCTION; - void operator=(const ObjCListBase &) LLVM_DELETED_FUNCTION; + ObjCListBase(const ObjCListBase &) = delete; + void operator=(const ObjCListBase &) = delete; protected: /// List is an array of pointers to objects that are not owned by this object. void **List; diff --git a/clang/include/clang/AST/DeclTemplate.h b/clang/include/clang/AST/DeclTemplate.h index da370ae..61ca105 100644 --- a/clang/include/clang/AST/DeclTemplate.h +++ b/clang/include/clang/AST/DeclTemplate.h @@ -158,8 +158,8 @@ class TemplateArgumentList { /// argument list. unsigned NumArguments; - TemplateArgumentList(const TemplateArgumentList &Other) LLVM_DELETED_FUNCTION; - void operator=(const TemplateArgumentList &Other) LLVM_DELETED_FUNCTION; + TemplateArgumentList(const TemplateArgumentList &Other) = delete; + void operator=(const TemplateArgumentList &Other) = delete; TemplateArgumentList(const TemplateArgument *Args, unsigned NumArgs, bool Owned) @@ -885,7 +885,7 @@ public: /// This class is inheritedly privately by different kinds of template /// parameters and is not part of the Decl hierarchy. Just a facility. class TemplateParmPosition { - TemplateParmPosition() LLVM_DELETED_FUNCTION; + TemplateParmPosition() = delete; protected: TemplateParmPosition(unsigned D, unsigned P) diff --git a/clang/include/clang/AST/DeclarationName.h b/clang/include/clang/AST/DeclarationName.h index fa36c2f..ec0fb0b 100644 --- a/clang/include/clang/AST/DeclarationName.h +++ b/clang/include/clang/AST/DeclarationName.h @@ -344,8 +344,8 @@ class DeclarationNameTable { CXXOperatorIdName *CXXOperatorNames; // Operator names void *CXXLiteralOperatorNames; // Actually a CXXOperatorIdName* - DeclarationNameTable(const DeclarationNameTable&) LLVM_DELETED_FUNCTION; - void operator=(const DeclarationNameTable&) LLVM_DELETED_FUNCTION; + DeclarationNameTable(const DeclarationNameTable&) = delete; + void operator=(const DeclarationNameTable&) = delete; public: DeclarationNameTable(const ASTContext &C); diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h index 96131d2..32adaae 100644 --- a/clang/include/clang/AST/Expr.h +++ b/clang/include/clang/AST/Expr.h @@ -1239,8 +1239,8 @@ class APNumericStorage { bool hasAllocation() const { return llvm::APInt::getNumWords(BitWidth) > 1; } - APNumericStorage(const APNumericStorage &) LLVM_DELETED_FUNCTION; - void operator=(const APNumericStorage &) LLVM_DELETED_FUNCTION; + APNumericStorage(const APNumericStorage &) = delete; + void operator=(const APNumericStorage &) = delete; protected: APNumericStorage() : VAL(0), BitWidth(0) { } diff --git a/clang/include/clang/AST/NestedNameSpecifier.h b/clang/include/clang/AST/NestedNameSpecifier.h index b853a56..4da17b0 100644 --- a/clang/include/clang/AST/NestedNameSpecifier.h +++ b/clang/include/clang/AST/NestedNameSpecifier.h @@ -102,7 +102,7 @@ private: Specifier(Other.Specifier) { } - void operator=(const NestedNameSpecifier &) LLVM_DELETED_FUNCTION; + void operator=(const NestedNameSpecifier &) = delete; /// \brief Either find or insert the given nested name specifier /// mockup in the given context. diff --git a/clang/include/clang/AST/RecordLayout.h b/clang/include/clang/AST/RecordLayout.h index 7b77998..f9240f2 100644 --- a/clang/include/clang/AST/RecordLayout.h +++ b/clang/include/clang/AST/RecordLayout.h @@ -163,8 +163,8 @@ private: void Destroy(ASTContext &Ctx); - ASTRecordLayout(const ASTRecordLayout &) LLVM_DELETED_FUNCTION; - void operator=(const ASTRecordLayout &) LLVM_DELETED_FUNCTION; + ASTRecordLayout(const ASTRecordLayout &) = delete; + void operator=(const ASTRecordLayout &) = delete; public: /// getAlignment - Get the record alignment in characters. diff --git a/clang/include/clang/AST/TemplateBase.h b/clang/include/clang/AST/TemplateBase.h index 80b68bc..1d01753 100644 --- a/clang/include/clang/AST/TemplateBase.h +++ b/clang/include/clang/AST/TemplateBase.h @@ -114,7 +114,7 @@ private: struct TV TypeOrValue; }; - TemplateArgument(TemplateName, bool) LLVM_DELETED_FUNCTION; + TemplateArgument(TemplateName, bool) = delete; public: /// \brief Construct an empty, invalid template argument. diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index 71ed6ea..5db43b4 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -1179,8 +1179,8 @@ public: }; private: - Type(const Type &) LLVM_DELETED_FUNCTION; - void operator=(const Type &) LLVM_DELETED_FUNCTION; + Type(const Type &) = delete; + void operator=(const Type &) = delete; /// Bitfields required by the Type class. class TypeBitfields { diff --git a/clang/include/clang/ASTMatchers/Dynamic/Registry.h b/clang/include/clang/ASTMatchers/Dynamic/Registry.h index ad24a8d..fc1e783 100644 --- a/clang/include/clang/ASTMatchers/Dynamic/Registry.h +++ b/clang/include/clang/ASTMatchers/Dynamic/Registry.h @@ -123,7 +123,7 @@ public: Diagnostics *Error); private: - Registry() LLVM_DELETED_FUNCTION; + Registry() = delete; }; } // namespace dynamic diff --git a/clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h b/clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h index 1d983e1..9b7725a 100644 --- a/clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h +++ b/clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h @@ -430,8 +430,8 @@ private: } private: - BlockInfo(const BlockInfo &) LLVM_DELETED_FUNCTION; - void operator=(const BlockInfo &) LLVM_DELETED_FUNCTION; + BlockInfo(const BlockInfo &) = delete; + void operator=(const BlockInfo &) = delete; }; // We implement the CFGVisitor API diff --git a/clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h b/clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h index 2cd8c6d..4b59466 100644 --- a/clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h +++ b/clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h @@ -282,7 +282,7 @@ public: /// SExpr objects cannot be deleted. // This declaration is public to workaround a gcc bug that breaks building // with REQUIRES_EH=1. - void operator delete(void *) LLVM_DELETED_FUNCTION; + void operator delete(void *) = delete; /// Returns the instruction ID for this expression. /// All basic block instructions have a unique ID (i.e. virtual register). @@ -309,10 +309,10 @@ protected: BasicBlock* Block; private: - SExpr() LLVM_DELETED_FUNCTION; + SExpr() = delete; /// SExpr objects must be created in an arena. - void *operator new(size_t) LLVM_DELETED_FUNCTION; + void *operator new(size_t) = delete; }; @@ -424,7 +424,7 @@ public: Future() : SExpr(COP_Future), Status(FS_pending), Result(nullptr) {} private: - virtual ~Future() LLVM_DELETED_FUNCTION; + virtual ~Future() = delete; public: // A lazy rewriting strategy should subclass Future and override this method. diff --git a/clang/include/clang/Analysis/Analyses/ThreadSafetyUtil.h b/clang/include/clang/Analysis/Analyses/ThreadSafetyUtil.h index ba3e0e5..42808a8 100644 --- a/clang/include/clang/Analysis/Analyses/ThreadSafetyUtil.h +++ b/clang/include/clang/Analysis/Analyses/ThreadSafetyUtil.h @@ -226,7 +226,7 @@ private: static const size_t InitialCapacity = 4; - SimpleArray(const SimpleArray &A) LLVM_DELETED_FUNCTION; + SimpleArray(const SimpleArray &A) = delete; T *Data; size_t Size; @@ -255,8 +255,8 @@ class CopyOnWriteVector { }; // No copy constructor or copy assignment. Use clone() with move assignment. - CopyOnWriteVector(const CopyOnWriteVector &V) LLVM_DELETED_FUNCTION; - void operator=(const CopyOnWriteVector &V) LLVM_DELETED_FUNCTION; + CopyOnWriteVector(const CopyOnWriteVector &V) = delete; + void operator=(const CopyOnWriteVector &V) = delete; public: CopyOnWriteVector() : Data(nullptr) {} diff --git a/clang/include/clang/Basic/Diagnostic.h b/clang/include/clang/Basic/Diagnostic.h index 0e1efca..6132ea3 100644 --- a/clang/include/clang/Basic/Diagnostic.h +++ b/clang/include/clang/Basic/Diagnostic.h @@ -132,8 +132,8 @@ public: /// the user. DiagnosticsEngine is tied to one translation unit and one /// SourceManager. class DiagnosticsEngine : public RefCountedBase { - DiagnosticsEngine(const DiagnosticsEngine &) LLVM_DELETED_FUNCTION; - void operator=(const DiagnosticsEngine &) LLVM_DELETED_FUNCTION; + DiagnosticsEngine(const DiagnosticsEngine &) = delete; + void operator=(const DiagnosticsEngine &) = delete; public: /// \brief The level of the diagnostic, after it has been through mapping. @@ -877,7 +877,7 @@ class DiagnosticBuilder { /// call to ForceEmit. mutable bool IsForceEmit; - void operator=(const DiagnosticBuilder &) LLVM_DELETED_FUNCTION; + void operator=(const DiagnosticBuilder &) = delete; friend class DiagnosticsEngine; DiagnosticBuilder() diff --git a/clang/include/clang/Basic/FileManager.h b/clang/include/clang/Basic/FileManager.h index 921a3af..37e19e1 100644 --- a/clang/include/clang/Basic/FileManager.h +++ b/clang/include/clang/Basic/FileManager.h @@ -73,7 +73,7 @@ class FileEntry { mutable std::unique_ptr File; friend class FileManager; - void operator=(const FileEntry &) LLVM_DELETED_FUNCTION; + void operator=(const FileEntry &) = delete; public: FileEntry() diff --git a/clang/include/clang/Basic/IdentifierTable.h b/clang/include/clang/Basic/IdentifierTable.h index 1de9dd1..f540c58 100644 --- a/clang/include/clang/Basic/IdentifierTable.h +++ b/clang/include/clang/Basic/IdentifierTable.h @@ -73,8 +73,8 @@ class IdentifierInfo { void *FETokenInfo; // Managed by the language front-end. llvm::StringMapEntry *Entry; - IdentifierInfo(const IdentifierInfo&) LLVM_DELETED_FUNCTION; - void operator=(const IdentifierInfo&) LLVM_DELETED_FUNCTION; + IdentifierInfo(const IdentifierInfo&) = delete; + void operator=(const IdentifierInfo&) = delete; friend class IdentifierTable; @@ -356,8 +356,8 @@ public: /// actual functionality. class IdentifierIterator { private: - IdentifierIterator(const IdentifierIterator &) LLVM_DELETED_FUNCTION; - void operator=(const IdentifierIterator &) LLVM_DELETED_FUNCTION; + IdentifierIterator(const IdentifierIterator &) = delete; + void operator=(const IdentifierIterator &) = delete; protected: IdentifierIterator() { } @@ -727,8 +727,8 @@ public: /// multi-keyword caching. class SelectorTable { void *Impl; // Actually a SelectorTableImpl - SelectorTable(const SelectorTable &) LLVM_DELETED_FUNCTION; - void operator=(const SelectorTable &) LLVM_DELETED_FUNCTION; + SelectorTable(const SelectorTable &) = delete; + void operator=(const SelectorTable &) = delete; public: SelectorTable(); ~SelectorTable(); diff --git a/clang/include/clang/Basic/SourceManager.h b/clang/include/clang/Basic/SourceManager.h index d17fdd5..4fa95c5 100644 --- a/clang/include/clang/Basic/SourceManager.h +++ b/clang/include/clang/Basic/SourceManager.h @@ -231,7 +231,7 @@ namespace SrcMgr { private: // Disable assignments. - ContentCache &operator=(const ContentCache& RHS) LLVM_DELETED_FUNCTION; + ContentCache &operator=(const ContentCache& RHS) = delete; }; // Assert that the \c ContentCache objects will always be 8-byte aligned so @@ -705,8 +705,8 @@ class SourceManager : public RefCountedBase { SmallVector, 2> StoredModuleBuildStack; // SourceManager doesn't support copy construction. - explicit SourceManager(const SourceManager&) LLVM_DELETED_FUNCTION; - void operator=(const SourceManager&) LLVM_DELETED_FUNCTION; + explicit SourceManager(const SourceManager&) = delete; + void operator=(const SourceManager&) = delete; public: SourceManager(DiagnosticsEngine &Diag, FileManager &FileMgr, bool UserFilesAreVolatile = false); diff --git a/clang/include/clang/Frontend/ASTUnit.h b/clang/include/clang/Frontend/ASTUnit.h index 2ddf616..79adf59 100644 --- a/clang/include/clang/Frontend/ASTUnit.h +++ b/clang/include/clang/Frontend/ASTUnit.h @@ -416,8 +416,8 @@ private: /// \brief Clear out and deallocate void ClearCachedCompletionResults(); - ASTUnit(const ASTUnit &) LLVM_DELETED_FUNCTION; - void operator=(const ASTUnit &) LLVM_DELETED_FUNCTION; + ASTUnit(const ASTUnit &) = delete; + void operator=(const ASTUnit &) = delete; explicit ASTUnit(bool MainFileIsAST); diff --git a/clang/include/clang/Frontend/CompilerInstance.h b/clang/include/clang/Frontend/CompilerInstance.h index e0996d4..f40e115 100644 --- a/clang/include/clang/Frontend/CompilerInstance.h +++ b/clang/include/clang/Frontend/CompilerInstance.h @@ -157,8 +157,8 @@ class CompilerInstance : public ModuleLoader { /// The list of active output files. std::list OutputFiles; - CompilerInstance(const CompilerInstance &) LLVM_DELETED_FUNCTION; - void operator=(const CompilerInstance &) LLVM_DELETED_FUNCTION; + CompilerInstance(const CompilerInstance &) = delete; + void operator=(const CompilerInstance &) = delete; public: explicit CompilerInstance(bool BuildingModule = false); ~CompilerInstance(); diff --git a/clang/include/clang/Frontend/CompilerInvocation.h b/clang/include/clang/Frontend/CompilerInvocation.h index f05ab80..7d12548 100644 --- a/clang/include/clang/Frontend/CompilerInvocation.h +++ b/clang/include/clang/Frontend/CompilerInvocation.h @@ -50,7 +50,7 @@ bool ParseDiagnosticArgs(DiagnosticOptions &Opts, llvm::opt::ArgList &Args, DiagnosticsEngine *Diags = nullptr); class CompilerInvocationBase : public RefCountedBase { - void operator=(const CompilerInvocationBase &) LLVM_DELETED_FUNCTION; + void operator=(const CompilerInvocationBase &) = delete; public: /// Options controlling the language variant. diff --git a/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h b/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h index 80e140b..aa0bcc9 100644 --- a/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h +++ b/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h @@ -180,8 +180,8 @@ public: } private: - Directive(const Directive &) LLVM_DELETED_FUNCTION; - void operator=(const Directive &) LLVM_DELETED_FUNCTION; + Directive(const Directive &) = delete; + void operator=(const Directive &) = delete; }; typedef std::vector> DirectiveList; diff --git a/clang/include/clang/Lex/HeaderMap.h b/clang/include/clang/Lex/HeaderMap.h index 993c861..183361e 100644 --- a/clang/include/clang/Lex/HeaderMap.h +++ b/clang/include/clang/Lex/HeaderMap.h @@ -32,8 +32,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 &) LLVM_DELETED_FUNCTION; - void operator=(const HeaderMap &) LLVM_DELETED_FUNCTION; + HeaderMap(const HeaderMap &) = delete; + void operator=(const HeaderMap &) = delete; std::unique_ptr FileBuffer; bool NeedsBSwap; diff --git a/clang/include/clang/Lex/HeaderSearch.h b/clang/include/clang/Lex/HeaderSearch.h index 2daba20..1fed331 100644 --- a/clang/include/clang/Lex/HeaderSearch.h +++ b/clang/include/clang/Lex/HeaderSearch.h @@ -255,8 +255,8 @@ class HeaderSearch { const LangOptions &LangOpts; // HeaderSearch doesn't support default or copy construction. - HeaderSearch(const HeaderSearch&) LLVM_DELETED_FUNCTION; - void operator=(const HeaderSearch&) LLVM_DELETED_FUNCTION; + HeaderSearch(const HeaderSearch&) = delete; + void operator=(const HeaderSearch&) = delete; friend class DirectoryLookup; diff --git a/clang/include/clang/Lex/Lexer.h b/clang/include/clang/Lex/Lexer.h index 42fe020..07564b9 100644 --- a/clang/include/clang/Lex/Lexer.h +++ b/clang/include/clang/Lex/Lexer.h @@ -89,8 +89,8 @@ class Lexer : public PreprocessorLexer { // CurrentConflictMarkerState - The kind of conflict marker we are handling. ConflictMarkerKind CurrentConflictMarkerState; - Lexer(const Lexer &) LLVM_DELETED_FUNCTION; - void operator=(const Lexer &) LLVM_DELETED_FUNCTION; + Lexer(const Lexer &) = delete; + void operator=(const Lexer &) = delete; friend class Preprocessor; void InitLexer(const char *BufStart, const char *BufPtr, const char *BufEnd); diff --git a/clang/include/clang/Lex/PTHLexer.h b/clang/include/clang/Lex/PTHLexer.h index 54c91f6..75abf6b 100644 --- a/clang/include/clang/Lex/PTHLexer.h +++ b/clang/include/clang/Lex/PTHLexer.h @@ -44,8 +44,8 @@ class PTHLexer : public PreprocessorLexer { /// to process when doing quick skipping of preprocessor blocks. const unsigned char* CurPPCondPtr; - PTHLexer(const PTHLexer &) LLVM_DELETED_FUNCTION; - void operator=(const PTHLexer &) LLVM_DELETED_FUNCTION; + PTHLexer(const PTHLexer &) = delete; + void operator=(const PTHLexer &) = delete; /// ReadToken - Used by PTHLexer to read tokens TokBuf. void ReadToken(Token& T); diff --git a/clang/include/clang/Lex/PTHManager.h b/clang/include/clang/Lex/PTHManager.h index 64ecf5f5..e09afefe 100644 --- a/clang/include/clang/Lex/PTHManager.h +++ b/clang/include/clang/Lex/PTHManager.h @@ -91,8 +91,8 @@ class PTHManager : public IdentifierInfoLookup { std::unique_ptr stringIdLookup, unsigned numIds, const unsigned char *spellingBase, const char *originalSourceFile); - PTHManager(const PTHManager &) LLVM_DELETED_FUNCTION; - void operator=(const PTHManager &) LLVM_DELETED_FUNCTION; + PTHManager(const PTHManager &) = delete; + void operator=(const PTHManager &) = delete; /// getSpellingAtPTHOffset - Used by PTHLexer classes to get the cached /// spelling for a token. diff --git a/clang/include/clang/Lex/PreprocessorLexer.h b/clang/include/clang/Lex/PreprocessorLexer.h index 3a91fa7..6d6cf05 100644 --- a/clang/include/clang/Lex/PreprocessorLexer.h +++ b/clang/include/clang/Lex/PreprocessorLexer.h @@ -69,8 +69,8 @@ protected: /// we are currently in. SmallVector ConditionalStack; - PreprocessorLexer(const PreprocessorLexer &) LLVM_DELETED_FUNCTION; - void operator=(const PreprocessorLexer &) LLVM_DELETED_FUNCTION; + PreprocessorLexer(const PreprocessorLexer &) = delete; + void operator=(const PreprocessorLexer &) = delete; friend class Preprocessor; PreprocessorLexer(Preprocessor *pp, FileID fid); diff --git a/clang/include/clang/Lex/TokenLexer.h b/clang/include/clang/Lex/TokenLexer.h index 306f98e..3119736 100644 --- a/clang/include/clang/Lex/TokenLexer.h +++ b/clang/include/clang/Lex/TokenLexer.h @@ -99,8 +99,8 @@ class TokenLexer { /// should not be subject to further macro expansion. bool DisableMacroExpansion : 1; - TokenLexer(const TokenLexer &) LLVM_DELETED_FUNCTION; - void operator=(const TokenLexer &) LLVM_DELETED_FUNCTION; + TokenLexer(const TokenLexer &) = delete; + void operator=(const TokenLexer &) = delete; public: /// Create a TokenLexer for the specified macro with the specified actual /// arguments. Note that this ctor takes ownership of the ActualArgs pointer. diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h index 675c455..fd120ae 100644 --- a/clang/include/clang/Parse/Parser.h +++ b/clang/include/clang/Parse/Parser.h @@ -745,8 +745,8 @@ public: /// the parser will exit the scope. class ParseScope { Parser *Self; - ParseScope(const ParseScope &) LLVM_DELETED_FUNCTION; - void operator=(const ParseScope &) LLVM_DELETED_FUNCTION; + ParseScope(const ParseScope &) = delete; + void operator=(const ParseScope &) = delete; public: // ParseScope - Construct a new object to manage a scope in the @@ -790,8 +790,8 @@ private: class ParseScopeFlags { Scope *CurScope; unsigned OldFlags; - ParseScopeFlags(const ParseScopeFlags &) LLVM_DELETED_FUNCTION; - void operator=(const ParseScopeFlags &) LLVM_DELETED_FUNCTION; + ParseScopeFlags(const ParseScopeFlags &) = delete; + void operator=(const ParseScopeFlags &) = delete; public: ParseScopeFlags(Parser *Self, unsigned ScopeFlags, bool ManageFlags = true); diff --git a/clang/include/clang/Rewrite/Core/DeltaTree.h b/clang/include/clang/Rewrite/Core/DeltaTree.h index 248f2a0..fbffb38 100644 --- a/clang/include/clang/Rewrite/Core/DeltaTree.h +++ b/clang/include/clang/Rewrite/Core/DeltaTree.h @@ -27,7 +27,7 @@ namespace clang { /// as well, without traversing the whole tree. class DeltaTree { void *Root; // "DeltaTreeNode *" - void operator=(const DeltaTree &) LLVM_DELETED_FUNCTION; + void operator=(const DeltaTree &) = delete; public: DeltaTree(); diff --git a/clang/include/clang/Rewrite/Core/RewriteRope.h b/clang/include/clang/Rewrite/Core/RewriteRope.h index 1c6f3eb..5002554 100644 --- a/clang/include/clang/Rewrite/Core/RewriteRope.h +++ b/clang/include/clang/Rewrite/Core/RewriteRope.h @@ -136,7 +136,7 @@ namespace clang { class RopePieceBTree { void /*RopePieceBTreeNode*/ *Root; - void operator=(const RopePieceBTree &) LLVM_DELETED_FUNCTION; + void operator=(const RopePieceBTree &) = delete; public: RopePieceBTree(); RopePieceBTree(const RopePieceBTree &RHS); diff --git a/clang/include/clang/Rewrite/Core/TokenRewriter.h b/clang/include/clang/Rewrite/Core/TokenRewriter.h index 598477f..0f71e81c3 100644 --- a/clang/include/clang/Rewrite/Core/TokenRewriter.h +++ b/clang/include/clang/Rewrite/Core/TokenRewriter.h @@ -43,8 +43,8 @@ namespace clang { /// std::unique_ptr ScratchBuf; - TokenRewriter(const TokenRewriter &) LLVM_DELETED_FUNCTION; - void operator=(const TokenRewriter &) LLVM_DELETED_FUNCTION; + TokenRewriter(const TokenRewriter &) = delete; + void operator=(const TokenRewriter &) = delete; public: /// TokenRewriter - This creates a TokenRewriter for the file with the /// specified FileID. diff --git a/clang/include/clang/Sema/AttributeList.h b/clang/include/clang/Sema/AttributeList.h index ff16b89..58b1b9e 100644 --- a/clang/include/clang/Sema/AttributeList.h +++ b/clang/include/clang/Sema/AttributeList.h @@ -204,10 +204,10 @@ private: return *reinterpret_cast(this + 1); } - AttributeList(const AttributeList &) LLVM_DELETED_FUNCTION; - void operator=(const AttributeList &) LLVM_DELETED_FUNCTION; - void operator delete(void *) LLVM_DELETED_FUNCTION; - ~AttributeList() LLVM_DELETED_FUNCTION; + AttributeList(const AttributeList &) = delete; + void operator=(const AttributeList &) = delete; + void operator delete(void *) = delete; + ~AttributeList() = delete; size_t allocated_size() const; @@ -670,7 +670,7 @@ public: : pool(factory), list(nullptr) { } - ParsedAttributes(const ParsedAttributes &) LLVM_DELETED_FUNCTION; + ParsedAttributes(const ParsedAttributes &) = delete; AttributePool &getPool() const { return pool; } diff --git a/clang/include/clang/Sema/CodeCompleteConsumer.h b/clang/include/clang/Sema/CodeCompleteConsumer.h index e3fd66f..83a0d57 100644 --- a/clang/include/clang/Sema/CodeCompleteConsumer.h +++ b/clang/include/clang/Sema/CodeCompleteConsumer.h @@ -440,8 +440,8 @@ private: /// entity being completed by this result. const char *BriefComment; - CodeCompletionString(const CodeCompletionString &) LLVM_DELETED_FUNCTION; - void operator=(const CodeCompletionString &) LLVM_DELETED_FUNCTION; + CodeCompletionString(const CodeCompletionString &) = delete; + void operator=(const CodeCompletionString &) = delete; CodeCompletionString(const Chunk *Chunks, unsigned NumChunks, unsigned Priority, CXAvailabilityKind Availability, diff --git a/clang/include/clang/Sema/DeclSpec.h b/clang/include/clang/Sema/DeclSpec.h index 761e583..76ccb1d 100644 --- a/clang/include/clang/Sema/DeclSpec.h +++ b/clang/include/clang/Sema/DeclSpec.h @@ -407,8 +407,8 @@ private: return (T == TST_typeofExpr || T == TST_decltype); } - DeclSpec(const DeclSpec &) LLVM_DELETED_FUNCTION; - void operator=(const DeclSpec &) LLVM_DELETED_FUNCTION; + DeclSpec(const DeclSpec &) = delete; + void operator=(const DeclSpec &) = delete; public: static bool isDeclRep(TST T) { return (T == TST_enum || T == TST_struct || @@ -845,8 +845,8 @@ private: /// \brief Represents a C++ unqualified-id that has been parsed. class UnqualifiedId { private: - UnqualifiedId(const UnqualifiedId &Other) LLVM_DELETED_FUNCTION; - const UnqualifiedId &operator=(const UnqualifiedId &) LLVM_DELETED_FUNCTION; + UnqualifiedId(const UnqualifiedId &Other) = delete; + const UnqualifiedId &operator=(const UnqualifiedId &) = delete; public: /// \brief Describes the kind of unqualified-id parsed. diff --git a/clang/include/clang/Sema/DelayedDiagnostic.h b/clang/include/clang/Sema/DelayedDiagnostic.h index 7fd6779..e19d111 100644 --- a/clang/include/clang/Sema/DelayedDiagnostic.h +++ b/clang/include/clang/Sema/DelayedDiagnostic.h @@ -240,8 +240,8 @@ class DelayedDiagnosticPool { const DelayedDiagnosticPool *Parent; SmallVector Diagnostics; - DelayedDiagnosticPool(const DelayedDiagnosticPool &) LLVM_DELETED_FUNCTION; - void operator=(const DelayedDiagnosticPool &) LLVM_DELETED_FUNCTION; + DelayedDiagnosticPool(const DelayedDiagnosticPool &) = delete; + void operator=(const DelayedDiagnosticPool &) = delete; public: DelayedDiagnosticPool(const DelayedDiagnosticPool *parent) : Parent(parent) {} ~DelayedDiagnosticPool() { diff --git a/clang/include/clang/Sema/Overload.h b/clang/include/clang/Sema/Overload.h index 4447db2..2007dcb 100644 --- a/clang/include/clang/Sema/Overload.h +++ b/clang/include/clang/Sema/Overload.h @@ -718,8 +718,8 @@ namespace clang { llvm::AlignedCharArray::Alignment, 16 * sizeof(ImplicitConversionSequence)> InlineSpace; - OverloadCandidateSet(const OverloadCandidateSet &) LLVM_DELETED_FUNCTION; - void operator=(const OverloadCandidateSet &) LLVM_DELETED_FUNCTION; + OverloadCandidateSet(const OverloadCandidateSet &) = delete; + void operator=(const OverloadCandidateSet &) = delete; void destroyCandidates(); diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index 91aee24..ab743d6 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -211,8 +211,8 @@ typedef std::pair, /// Sema - This implements semantic analysis and AST building for C. class Sema { - Sema(const Sema &) LLVM_DELETED_FUNCTION; - void operator=(const Sema &) LLVM_DELETED_FUNCTION; + Sema(const Sema &) = delete; + void operator=(const Sema &) = delete; ///\brief Source of additional semantic information. ExternalSemaSource *ExternalSource; @@ -6612,10 +6612,10 @@ public: ArrayRef TemplateArgs = ArrayRef(), sema::TemplateDeductionInfo *DeductionInfo = nullptr); - InstantiatingTemplate(const InstantiatingTemplate&) LLVM_DELETED_FUNCTION; + InstantiatingTemplate(const InstantiatingTemplate&) = delete; InstantiatingTemplate& - operator=(const InstantiatingTemplate&) LLVM_DELETED_FUNCTION; + operator=(const InstantiatingTemplate&) = delete; }; void PrintInstantiationStack(); diff --git a/clang/include/clang/Sema/Template.h b/clang/include/clang/Sema/Template.h index c08a5df..6c34e58 100644 --- a/clang/include/clang/Sema/Template.h +++ b/clang/include/clang/Sema/Template.h @@ -239,8 +239,8 @@ namespace clang { // This class is non-copyable LocalInstantiationScope( - const LocalInstantiationScope &) LLVM_DELETED_FUNCTION; - void operator=(const LocalInstantiationScope &) LLVM_DELETED_FUNCTION; + const LocalInstantiationScope &) = delete; + void operator=(const LocalInstantiationScope &) = delete; public: LocalInstantiationScope(Sema &SemaRef, bool CombineWithOuterScope = false) diff --git a/clang/include/clang/Sema/TemplateDeduction.h b/clang/include/clang/Sema/TemplateDeduction.h index 8338d97..d1aa081 100644 --- a/clang/include/clang/Sema/TemplateDeduction.h +++ b/clang/include/clang/Sema/TemplateDeduction.h @@ -44,8 +44,8 @@ class TemplateDeductionInfo { /// SFINAE while performing template argument deduction. SmallVector SuppressedDiagnostics; - TemplateDeductionInfo(const TemplateDeductionInfo &) LLVM_DELETED_FUNCTION; - void operator=(const TemplateDeductionInfo &) LLVM_DELETED_FUNCTION; + TemplateDeductionInfo(const TemplateDeductionInfo &) = delete; + void operator=(const TemplateDeductionInfo &) = delete; public: TemplateDeductionInfo(SourceLocation Loc) @@ -252,8 +252,8 @@ class TemplateSpecCandidateSet { SourceLocation Loc; TemplateSpecCandidateSet( - const TemplateSpecCandidateSet &) LLVM_DELETED_FUNCTION; - void operator=(const TemplateSpecCandidateSet &) LLVM_DELETED_FUNCTION; + const TemplateSpecCandidateSet &) = delete; + void operator=(const TemplateSpecCandidateSet &) = delete; void destroyCandidates(); diff --git a/clang/include/clang/Serialization/ASTReader.h b/clang/include/clang/Serialization/ASTReader.h index d25f030..d7ecf26 100644 --- a/clang/include/clang/Serialization/ASTReader.h +++ b/clang/include/clang/Serialization/ASTReader.h @@ -1077,8 +1077,8 @@ private: ASTReader &Reader; enum ReadingKind PrevKind; - ReadingKindTracker(const ReadingKindTracker &) LLVM_DELETED_FUNCTION; - void operator=(const ReadingKindTracker &) LLVM_DELETED_FUNCTION; + ReadingKindTracker(const ReadingKindTracker &) = delete; + void operator=(const ReadingKindTracker &) = delete; public: ReadingKindTracker(enum ReadingKind newKind, ASTReader &reader) @@ -1275,8 +1275,8 @@ private: void Error(unsigned DiagID, StringRef Arg1 = StringRef(), StringRef Arg2 = StringRef()); - ASTReader(const ASTReader &) LLVM_DELETED_FUNCTION; - void operator=(const ASTReader &) LLVM_DELETED_FUNCTION; + ASTReader(const ASTReader &) = delete; + void operator=(const ASTReader &) = delete; public: /// \brief Load the AST file and validate its contents against the given /// Preprocessor. diff --git a/clang/include/clang/Serialization/ContinuousRangeMap.h b/clang/include/clang/Serialization/ContinuousRangeMap.h index 5f8ae1f..244b01b 100644 --- a/clang/include/clang/Serialization/ContinuousRangeMap.h +++ b/clang/include/clang/Serialization/ContinuousRangeMap.h @@ -109,8 +109,8 @@ public: class Builder { ContinuousRangeMap &Self; - Builder(const Builder&) LLVM_DELETED_FUNCTION; - Builder &operator=(const Builder&) LLVM_DELETED_FUNCTION; + Builder(const Builder&) = delete; + Builder &operator=(const Builder&) = delete; public: explicit Builder(ContinuousRangeMap &Self) : Self(Self) { } diff --git a/clang/include/clang/Serialization/GlobalModuleIndex.h b/clang/include/clang/Serialization/GlobalModuleIndex.h index d8a57be..640c7bb 100644 --- a/clang/include/clang/Serialization/GlobalModuleIndex.h +++ b/clang/include/clang/Serialization/GlobalModuleIndex.h @@ -118,8 +118,8 @@ class GlobalModuleIndex { explicit GlobalModuleIndex(std::unique_ptr Buffer, llvm::BitstreamCursor Cursor); - GlobalModuleIndex(const GlobalModuleIndex &) LLVM_DELETED_FUNCTION; - GlobalModuleIndex &operator=(const GlobalModuleIndex &) LLVM_DELETED_FUNCTION; + GlobalModuleIndex(const GlobalModuleIndex &) = delete; + GlobalModuleIndex &operator=(const GlobalModuleIndex &) = delete; public: ~GlobalModuleIndex(); diff --git a/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h b/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h index b4ab1ea..ce4dfb2 100644 --- a/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h +++ b/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h @@ -352,9 +352,9 @@ private: std::vector ranges; - PathDiagnosticPiece() LLVM_DELETED_FUNCTION; - PathDiagnosticPiece(const PathDiagnosticPiece &P) LLVM_DELETED_FUNCTION; - void operator=(const PathDiagnosticPiece &P) LLVM_DELETED_FUNCTION; + PathDiagnosticPiece() = delete; + PathDiagnosticPiece(const PathDiagnosticPiece &P) = delete; + void operator=(const PathDiagnosticPiece &P) = delete; protected: PathDiagnosticPiece(StringRef s, Kind k, DisplayHint hint = Below); @@ -730,7 +730,7 @@ class PathDiagnostic : public llvm::FoldingSetNode { PathDiagnosticLocation UniqueingLoc; const Decl *UniqueingDecl; - PathDiagnostic() LLVM_DELETED_FUNCTION; + PathDiagnostic() = delete; public: PathDiagnostic(StringRef CheckName, const Decl *DeclWithIssue, StringRef bugtype, StringRef verboseDesc, StringRef shortDesc, diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h index 00deaa6..63b8631 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h @@ -119,7 +119,7 @@ private: const LocationContext *LCtx; llvm::PointerUnion Origin; - void operator=(const CallEvent &) LLVM_DELETED_FUNCTION; + void operator=(const CallEvent &) = delete; protected: // This is user data for subclasses. diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h index 0dafd5f..77b8f2a 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h @@ -103,8 +103,8 @@ private: ExplodedNode *Pred); private: - CoreEngine(const CoreEngine &) LLVM_DELETED_FUNCTION; - void operator=(const CoreEngine &) LLVM_DELETED_FUNCTION; + CoreEngine(const CoreEngine &) = delete; + void operator=(const CoreEngine &) = delete; ExplodedNode *generateCallExitBeginNode(ExplodedNode *N); diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h index e819b88..ac4e452 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h @@ -76,7 +76,7 @@ public: typedef llvm::ImmutableMap GenericDataMap; private: - void operator=(const ProgramState& R) LLVM_DELETED_FUNCTION; + void operator=(const ProgramState& R) = delete; friend class ProgramStateManager; friend class ExplodedGraph; diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h index ef43fe0..642e11a 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h @@ -203,8 +203,8 @@ class DefinedOrUnknownSVal : public SVal { private: // We want calling these methods to be a compiler error since they are // tautologically false. - bool isUndef() const LLVM_DELETED_FUNCTION; - bool isValid() const LLVM_DELETED_FUNCTION; + bool isUndef() const = delete; + bool isValid() const = delete; protected: DefinedOrUnknownSVal() {} @@ -236,9 +236,9 @@ class DefinedSVal : public DefinedOrUnknownSVal { private: // We want calling these methods to be a compiler error since they are // tautologically true/false. - bool isUnknown() const LLVM_DELETED_FUNCTION; - bool isUnknownOrUndef() const LLVM_DELETED_FUNCTION; - bool isValid() const LLVM_DELETED_FUNCTION; + bool isUnknown() const = delete; + bool isUnknownOrUndef() const = delete; + bool isValid() const = delete; protected: DefinedSVal() {} explicit DefinedSVal(const void *d, bool isLoc, unsigned ValKind) diff --git a/clang/lib/AST/RecordLayoutBuilder.cpp b/clang/lib/AST/RecordLayoutBuilder.cpp index 0d070a4..f4733cc 100644 --- a/clang/lib/AST/RecordLayoutBuilder.cpp +++ b/clang/lib/AST/RecordLayoutBuilder.cpp @@ -748,8 +748,8 @@ protected: void setDataSize(CharUnits NewSize) { DataSize = Context.toBits(NewSize); } void setDataSize(uint64_t NewSize) { DataSize = NewSize; } - RecordLayoutBuilder(const RecordLayoutBuilder &) LLVM_DELETED_FUNCTION; - void operator=(const RecordLayoutBuilder &) LLVM_DELETED_FUNCTION; + RecordLayoutBuilder(const RecordLayoutBuilder &) = delete; + void operator=(const RecordLayoutBuilder &) = delete; }; } // end anonymous namespace @@ -2152,9 +2152,8 @@ struct MicrosoftRecordLayoutBuilder { typedef llvm::DenseMap BaseOffsetsMapTy; MicrosoftRecordLayoutBuilder(const ASTContext &Context) : Context(Context) {} private: - MicrosoftRecordLayoutBuilder(const MicrosoftRecordLayoutBuilder &) - LLVM_DELETED_FUNCTION; - void operator=(const MicrosoftRecordLayoutBuilder &) LLVM_DELETED_FUNCTION; + MicrosoftRecordLayoutBuilder(const MicrosoftRecordLayoutBuilder &) = delete; + void operator=(const MicrosoftRecordLayoutBuilder &) = delete; public: void layout(const RecordDecl *RD); void cxxLayout(const CXXRecordDecl *RD); diff --git a/clang/lib/CodeGen/CGBuilder.h b/clang/lib/CodeGen/CGBuilder.h index 72ba4fa..6610659 100644 --- a/clang/lib/CodeGen/CGBuilder.h +++ b/clang/lib/CodeGen/CGBuilder.h @@ -33,7 +33,7 @@ protected: llvm::BasicBlock *BB, llvm::BasicBlock::iterator InsertPt) const; private: - void operator=(const CGBuilderInserter &) LLVM_DELETED_FUNCTION; + void operator=(const CGBuilderInserter &) = delete; CodeGenFunction *CGF; }; diff --git a/clang/lib/CodeGen/CGCleanup.h b/clang/lib/CodeGen/CGCleanup.h index dd156c6..61893c6 100644 --- a/clang/lib/CodeGen/CGCleanup.h +++ b/clang/lib/CodeGen/CGCleanup.h @@ -284,7 +284,7 @@ public: delete ExtInfo; } // Objects of EHCleanupScope are not destructed. Use Destroy(). - ~EHCleanupScope() LLVM_DELETED_FUNCTION; + ~EHCleanupScope() = delete; bool isNormalCleanup() const { return CleanupBits.IsNormalCleanup; } llvm::BasicBlock *getNormalBlock() const { return NormalBlock; } diff --git a/clang/lib/CodeGen/CGLoopInfo.h b/clang/lib/CodeGen/CGLoopInfo.h index b169399..aee1621 100644 --- a/clang/lib/CodeGen/CGLoopInfo.h +++ b/clang/lib/CodeGen/CGLoopInfo.h @@ -78,8 +78,8 @@ private: /// This stack can be used to prepare attributes which are applied when a loop /// is emitted. class LoopInfoStack { - LoopInfoStack(const LoopInfoStack &) LLVM_DELETED_FUNCTION; - void operator=(const LoopInfoStack &) LLVM_DELETED_FUNCTION; + LoopInfoStack(const LoopInfoStack &) = delete; + void operator=(const LoopInfoStack &) = delete; public: LoopInfoStack() {} diff --git a/clang/lib/CodeGen/CGRecordLayout.h b/clang/lib/CodeGen/CGRecordLayout.h index 2de0b2f..c15f9fd 100644 --- a/clang/lib/CodeGen/CGRecordLayout.h +++ b/clang/lib/CodeGen/CGRecordLayout.h @@ -109,8 +109,8 @@ struct CGBitFieldInfo { class CGRecordLayout { friend class CodeGenTypes; - CGRecordLayout(const CGRecordLayout &) LLVM_DELETED_FUNCTION; - void operator=(const CGRecordLayout &) LLVM_DELETED_FUNCTION; + CGRecordLayout(const CGRecordLayout &) = delete; + void operator=(const CGRecordLayout &) = delete; private: /// The LLVM type corresponding to this record layout; used when diff --git a/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp b/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp index 7ad394b..202ea97 100644 --- a/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp +++ b/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp @@ -198,8 +198,8 @@ struct CGRecordLowering { bool IsZeroInitializableAsBase : 1; bool Packed : 1; private: - CGRecordLowering(const CGRecordLowering &) LLVM_DELETED_FUNCTION; - void operator =(const CGRecordLowering &) LLVM_DELETED_FUNCTION; + CGRecordLowering(const CGRecordLowering &) = delete; + void operator =(const CGRecordLowering &) = delete; }; } // namespace { diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index dc29858..b52ba8a 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -97,8 +97,8 @@ enum TypeEvaluationKind { /// CodeGenFunction - This class organizes the per-function state that is used /// while generating LLVM code. class CodeGenFunction : public CodeGenTypeCache { - CodeGenFunction(const CodeGenFunction &) LLVM_DELETED_FUNCTION; - void operator=(const CodeGenFunction &) LLVM_DELETED_FUNCTION; + CodeGenFunction(const CodeGenFunction &) = delete; + void operator=(const CodeGenFunction &) = delete; friend class CGCXXABI; public: @@ -510,8 +510,8 @@ public: bool PerformCleanup; private: - RunCleanupsScope(const RunCleanupsScope &) LLVM_DELETED_FUNCTION; - void operator=(const RunCleanupsScope &) LLVM_DELETED_FUNCTION; + RunCleanupsScope(const RunCleanupsScope &) = delete; + void operator=(const RunCleanupsScope &) = delete; protected: CodeGenFunction& CGF; @@ -559,8 +559,8 @@ public: SmallVector Labels; LexicalScope *ParentScope; - LexicalScope(const LexicalScope &) LLVM_DELETED_FUNCTION; - void operator=(const LexicalScope &) LLVM_DELETED_FUNCTION; + LexicalScope(const LexicalScope &) = delete; + void operator=(const LexicalScope &) = delete; public: /// \brief Enter a new cleanup scope. @@ -612,8 +612,8 @@ public: VarDeclMapTy SavedPrivates; private: - OMPPrivateScope(const OMPPrivateScope &) LLVM_DELETED_FUNCTION; - void operator=(const OMPPrivateScope &) LLVM_DELETED_FUNCTION; + OMPPrivateScope(const OMPPrivateScope &) = delete; + void operator=(const OMPPrivateScope &) = delete; public: /// \brief Enter a new OpenMP private scope. diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 81b758a..7daa093 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -258,8 +258,8 @@ public: /// This class organizes the cross-function state that is used while generating /// LLVM code. class CodeGenModule : public CodeGenTypeCache { - CodeGenModule(const CodeGenModule &) LLVM_DELETED_FUNCTION; - void operator=(const CodeGenModule &) LLVM_DELETED_FUNCTION; + CodeGenModule(const CodeGenModule &) = delete; + void operator=(const CodeGenModule &) = delete; public: struct Structor { diff --git a/clang/lib/CodeGen/SanitizerMetadata.h b/clang/lib/CodeGen/SanitizerMetadata.h index d2f0651..166f0e6 100644 --- a/clang/lib/CodeGen/SanitizerMetadata.h +++ b/clang/lib/CodeGen/SanitizerMetadata.h @@ -31,8 +31,8 @@ namespace CodeGen { class CodeGenModule; class SanitizerMetadata { - SanitizerMetadata(const SanitizerMetadata &) LLVM_DELETED_FUNCTION; - void operator=(const SanitizerMetadata &) LLVM_DELETED_FUNCTION; + SanitizerMetadata(const SanitizerMetadata &) = delete; + void operator=(const SanitizerMetadata &) = delete; CodeGenModule &CGM; public: diff --git a/clang/lib/Format/FormatToken.h b/clang/lib/Format/FormatToken.h index 35cb39a..4692c20 100644 --- a/clang/lib/Format/FormatToken.h +++ b/clang/lib/Format/FormatToken.h @@ -419,8 +419,8 @@ struct FormatToken { private: // Disallow copying. - FormatToken(const FormatToken &) LLVM_DELETED_FUNCTION; - void operator=(const FormatToken &) LLVM_DELETED_FUNCTION; + FormatToken(const FormatToken &) = delete; + void operator=(const FormatToken &) = delete; }; class ContinuationIndenter; diff --git a/clang/lib/Format/TokenAnnotator.h b/clang/lib/Format/TokenAnnotator.h index f9e1efa..94ed1d1 100644 --- a/clang/lib/Format/TokenAnnotator.h +++ b/clang/lib/Format/TokenAnnotator.h @@ -104,8 +104,8 @@ public: private: // Disallow copying. - AnnotatedLine(const AnnotatedLine &) LLVM_DELETED_FUNCTION; - void operator=(const AnnotatedLine &) LLVM_DELETED_FUNCTION; + AnnotatedLine(const AnnotatedLine &) = delete; + void operator=(const AnnotatedLine &) = delete; }; /// \brief Determines extra information about the tokens comprising an diff --git a/clang/lib/Parse/RAIIObjectsForParser.h b/clang/lib/Parse/RAIIObjectsForParser.h index a0c9c1f..71cfec4 100644 --- a/clang/lib/Parse/RAIIObjectsForParser.h +++ b/clang/lib/Parse/RAIIObjectsForParser.h @@ -87,8 +87,8 @@ namespace clang { Sema::ParsingDeclState State; bool Popped; - ParsingDeclRAIIObject(const ParsingDeclRAIIObject &) LLVM_DELETED_FUNCTION; - void operator=(const ParsingDeclRAIIObject &) LLVM_DELETED_FUNCTION; + ParsingDeclRAIIObject(const ParsingDeclRAIIObject &) = delete; + void operator=(const ParsingDeclRAIIObject &) = delete; public: enum NoParent_t { NoParent }; @@ -244,8 +244,8 @@ namespace clang { /// the way they used to be. This is used to handle __extension__ in the /// parser. class ExtensionRAIIObject { - ExtensionRAIIObject(const ExtensionRAIIObject &) LLVM_DELETED_FUNCTION; - void operator=(const ExtensionRAIIObject &) LLVM_DELETED_FUNCTION; + ExtensionRAIIObject(const ExtensionRAIIObject &) = delete; + void operator=(const ExtensionRAIIObject &) = delete; DiagnosticsEngine &Diags; public: diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 1ee4d53..58bdbf5 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -9444,8 +9444,8 @@ namespace { // copy/move operators. These classes serve as factory functions and help us // avoid using the same Expr* in the AST twice. class ExprBuilder { - ExprBuilder(const ExprBuilder&) LLVM_DELETED_FUNCTION; - ExprBuilder &operator=(const ExprBuilder&) LLVM_DELETED_FUNCTION; + ExprBuilder(const ExprBuilder&) = delete; + ExprBuilder &operator=(const ExprBuilder&) = delete; protected: static Expr *assertNotNull(Expr *E) { diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index 8c16dfde..40466e2 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -128,7 +128,7 @@ namespace clang { mutable bool Owning; Decl::Kind DeclKind; - void operator=(RedeclarableResult &) LLVM_DELETED_FUNCTION; + void operator=(RedeclarableResult &) = delete; public: RedeclarableResult(ASTReader &Reader, GlobalDeclID FirstID, @@ -177,7 +177,7 @@ namespace clang { unsigned AnonymousDeclNumber; IdentifierInfo *TypedefNameForLinkage; - void operator=(FindExistingResult&) LLVM_DELETED_FUNCTION; + void operator=(FindExistingResult&) = delete; public: FindExistingResult(ASTReader &Reader) diff --git a/clang/tools/libclang/CXString.h b/clang/tools/libclang/CXString.h index f6b46f7..72ac0cf 100644 --- a/clang/tools/libclang/CXString.h +++ b/clang/tools/libclang/CXString.h @@ -63,7 +63,7 @@ CXString createDup(StringRef String); // In this case, call \c createRef(String.c_str()). // // If you need to make a copy, call \c createDup(StringRef(String)). -CXString createRef(std::string String) LLVM_DELETED_FUNCTION; +CXString createRef(std::string String) = delete; /// \brief Create a CXString object that is backed by a string buffer. CXString createCXString(CXStringBuf *buf); diff --git a/clang/tools/libclang/IndexingContext.h b/clang/tools/libclang/IndexingContext.h index 31fddfb..4da6aeb 100644 --- a/clang/tools/libclang/IndexingContext.h +++ b/clang/tools/libclang/IndexingContext.h @@ -245,8 +245,8 @@ class AttrListInfo { SmallVector CXAttrs; unsigned ref_cnt; - AttrListInfo(const AttrListInfo &) LLVM_DELETED_FUNCTION; - void operator=(const AttrListInfo &) LLVM_DELETED_FUNCTION; + AttrListInfo(const AttrListInfo &) = delete; + void operator=(const AttrListInfo &) = delete; public: AttrListInfo(const Decl *D, IndexingContext &IdxCtx); diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 242d2ba..07b4a24 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -5533,7 +5533,7 @@ TEST_F(FormatTest, FormatsCasts) { verifyFormat("int a = alignof(int) * b;", getGoogleStyle()); verifyFormat("template <> void f(int i) SOME_ANNOTATION;"); verifyFormat("f(\"%\" SOME_MACRO(ll) \"d\");"); - verifyFormat("aaaaa &operator=(const aaaaa &) LLVM_DELETED_FUNCTION;"); + verifyFormat("aaaaa &operator=(const aaaaa &) = delete;"); // These are not casts, but at some point were confused with casts. verifyFormat("virtual void foo(int *) override;"); -- 2.7.4