From 7cba50dfd49806d9c9135b104227e196a7f279f2 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 18 Feb 2013 23:11:09 +0000 Subject: [PATCH] Use LLVM_DELETED_FUNCTION rather than '// do not implement' comments. Also removes some redundant DNI comments on function declarations already using the macro. llvm-svn: 175465 --- clang/include/clang/Driver/OptSpecifier.h | 4 +++- clang/include/clang/Serialization/GlobalModuleIndex.h | 4 ++-- .../StaticAnalyzer/Core/BugReporter/PathDiagnostic.h | 2 +- .../clang/StaticAnalyzer/Core/PathSensitive/SVals.h | 18 +++++++++--------- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/clang/include/clang/Driver/OptSpecifier.h b/clang/include/clang/Driver/OptSpecifier.h index bb1cd17..e683ef3 100644 --- a/clang/include/clang/Driver/OptSpecifier.h +++ b/clang/include/clang/Driver/OptSpecifier.h @@ -10,6 +10,8 @@ #ifndef CLANG_DRIVER_OPTSPECIFIER_H #define CLANG_DRIVER_OPTSPECIFIER_H +#include "llvm/Support/Compiler.h" + namespace clang { namespace driver { class Option; @@ -19,7 +21,7 @@ namespace driver { unsigned ID; private: - explicit OptSpecifier(bool); // DO NOT IMPLEMENT + explicit OptSpecifier(bool) LLVM_DELETED_FUNCTION; public: OptSpecifier() : ID(0) {} diff --git a/clang/include/clang/Serialization/GlobalModuleIndex.h b/clang/include/clang/Serialization/GlobalModuleIndex.h index 20d995e..ec8ad35 100644 --- a/clang/include/clang/Serialization/GlobalModuleIndex.h +++ b/clang/include/clang/Serialization/GlobalModuleIndex.h @@ -94,8 +94,8 @@ class GlobalModuleIndex { explicit GlobalModuleIndex(FileManager &FileMgr, llvm::MemoryBuffer *Buffer, llvm::BitstreamCursor Cursor); - GlobalModuleIndex(const GlobalModuleIndex &); // DO NOT IMPLEMENT - GlobalModuleIndex &operator=(const GlobalModuleIndex &); // DO NOT IMPLEMENT + GlobalModuleIndex(const GlobalModuleIndex &) LLVM_DELETED_FUNCTION; + GlobalModuleIndex &operator=(const GlobalModuleIndex &) LLVM_DELETED_FUNCTION; public: ~GlobalModuleIndex(); diff --git a/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h b/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h index 253ac88..fa02c88 100644 --- a/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h +++ b/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h @@ -677,7 +677,7 @@ class PathDiagnostic : public llvm::FoldingSetNode { PathDiagnosticLocation UniqueingLoc; const Decl *UniqueingDecl; - PathDiagnostic(); // Do not implement. + PathDiagnostic() LLVM_DELETED_FUNCTION; public: PathDiagnostic(const Decl *DeclWithIssue, StringRef bugtype, StringRef verboseDesc, StringRef shortDesc, diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h index 0fb5af6..d77a796 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h @@ -168,10 +168,10 @@ public: class DefinedOrUnknownSVal : public SVal { private: - // Do not implement. We want calling these methods to be a compiler - // error since they are tautologically false. - bool isUndef() const; - bool isValid() const; + // 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; protected: explicit DefinedOrUnknownSVal(const void *d, bool isLoc, unsigned ValKind) @@ -198,11 +198,11 @@ public: class DefinedSVal : public DefinedOrUnknownSVal { private: - // Do not implement. We want calling these methods to be a compiler - // error since they are tautologically true/false. - bool isUnknown() const; - bool isUnknownOrUndef() const; - bool isValid() const; + // 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; protected: explicit DefinedSVal(const void *d, bool isLoc, unsigned ValKind) : DefinedOrUnknownSVal(d, isLoc, ValKind) {} -- 2.7.4