r234689 - Remove empty non-virtual destructors or mark them =default when non-public
Benjamin Kramer
benny.kra at googlemail.com
Sat Apr 11 08:58:30 PDT 2015
Author: d0k
Date: Sat Apr 11 10:58:30 2015
New Revision: 234689
URL: http://llvm.org/viewvc/llvm-project?rev=234689&view=rev
Log:
Remove empty non-virtual destructors or mark them =default when non-public
These add no value but can make a class non-trivially copyable. NFC.
Modified:
cfe/trunk/include/clang/AST/RecordLayout.h
cfe/trunk/include/clang/ASTMatchers/Dynamic/VariantValue.h
cfe/trunk/include/clang/Analysis/Analyses/LiveVariables.h
cfe/trunk/include/clang/Analysis/CFG.h
cfe/trunk/include/clang/Basic/SourceManagerInternals.h
cfe/trunk/include/clang/Lex/MacroArgs.h
cfe/trunk/include/clang/Lex/MacroInfo.h
cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
cfe/trunk/lib/Index/SimpleFormatContext.h
cfe/trunk/lib/Rewrite/RewriteRope.cpp
cfe/trunk/utils/TableGen/NeonEmitter.cpp
Modified: cfe/trunk/include/clang/AST/RecordLayout.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecordLayout.h?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/RecordLayout.h (original)
+++ cfe/trunk/include/clang/AST/RecordLayout.h Sat Apr 11 10:58:30 2015
@@ -159,7 +159,7 @@ private:
const BaseOffsetsMapTy& BaseOffsets,
const VBaseOffsetsMapTy& VBaseOffsets);
- ~ASTRecordLayout() {}
+ ~ASTRecordLayout() = default;
void Destroy(ASTContext &Ctx);
Modified: cfe/trunk/include/clang/ASTMatchers/Dynamic/VariantValue.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/ASTMatchers/Dynamic/VariantValue.h?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/include/clang/ASTMatchers/Dynamic/VariantValue.h (original)
+++ cfe/trunk/include/clang/ASTMatchers/Dynamic/VariantValue.h Sat Apr 11 10:58:30 2015
@@ -111,7 +111,7 @@ class VariantMatcher {
ArrayRef<VariantMatcher> InnerMatchers) const;
protected:
- ~MatcherOps() {}
+ ~MatcherOps() = default;
private:
ast_type_traits::ASTNodeKind NodeKind;
Modified: cfe/trunk/include/clang/Analysis/Analyses/LiveVariables.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/LiveVariables.h?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/Analyses/LiveVariables.h (original)
+++ cfe/trunk/include/clang/Analysis/Analyses/LiveVariables.h Sat Apr 11 10:58:30 2015
@@ -44,8 +44,6 @@ public:
llvm::ImmutableSet<const VarDecl *> LiveDecls)
: liveStmts(LiveStmts), liveDecls(LiveDecls) {}
- ~LivenessValues() {}
-
bool isLive(const Stmt *S) const;
bool isLive(const VarDecl *D) const;
Modified: cfe/trunk/include/clang/Analysis/CFG.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/CFG.h?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/CFG.h (original)
+++ cfe/trunk/include/clang/Analysis/CFG.h Sat Apr 11 10:58:30 2015
@@ -493,7 +493,6 @@ public:
: Elements(C), Label(nullptr), Terminator(nullptr), LoopTarget(nullptr),
BlockID(blockid), Preds(C, 1), Succs(C, 1), HasNoReturnElement(false),
Parent(parent) {}
- ~CFGBlock() {}
// Statement iterators
typedef ElementList::iterator iterator;
Modified: cfe/trunk/include/clang/Basic/SourceManagerInternals.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManagerInternals.h?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManagerInternals.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManagerInternals.h Sat Apr 11 10:58:30 2015
@@ -88,17 +88,12 @@ class LineTableInfo {
/// at which they occur in the file).
std::map<FileID, std::vector<LineEntry> > LineEntries;
public:
- LineTableInfo() {
- }
-
void clear() {
FilenameIDs.clear();
FilenamesByID.clear();
LineEntries.clear();
}
- ~LineTableInfo() {}
-
unsigned getLineTableFilenameID(StringRef Str);
const char *getFilename(unsigned ID) const {
assert(ID < FilenamesByID.size() && "Invalid FilenameID");
Modified: cfe/trunk/include/clang/Lex/MacroArgs.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/MacroArgs.h?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/MacroArgs.h (original)
+++ cfe/trunk/include/clang/Lex/MacroArgs.h Sat Apr 11 10:58:30 2015
@@ -56,7 +56,8 @@ class MacroArgs {
MacroArgs(unsigned NumToks, bool varargsElided)
: NumUnexpArgTokens(NumToks), VarargsElided(varargsElided),
ArgCache(nullptr) {}
- ~MacroArgs() {}
+ ~MacroArgs() = default;
+
public:
/// MacroArgs ctor function - Create a new MacroArgs object with the specified
/// macro and argument info.
Modified: cfe/trunk/include/clang/Lex/MacroInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/MacroInfo.h?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/MacroInfo.h (original)
+++ cfe/trunk/include/clang/Lex/MacroInfo.h Sat Apr 11 10:58:30 2015
@@ -109,7 +109,7 @@ class MacroInfo {
// Only the Preprocessor gets to create and destroy these.
MacroInfo(SourceLocation DefLoc);
- ~MacroInfo() {}
+ ~MacroInfo() = default;
public:
/// \brief Return the location that the macro was defined at.
Modified: cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h (original)
+++ cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h Sat Apr 11 10:58:30 2015
@@ -449,7 +449,7 @@ private:
const char **Annotations, unsigned NumAnnotations,
StringRef ParentName,
const char *BriefComment);
- ~CodeCompletionString() { }
+ ~CodeCompletionString() = default;
friend class CodeCompletionBuilder;
friend class CodeCompletionResult;
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h Sat Apr 11 10:58:30 2015
@@ -106,7 +106,6 @@ private:
public:
EnvironmentManager(llvm::BumpPtrAllocator& Allocator) : F(Allocator) {}
- ~EnvironmentManager() {}
Environment getInitialEnvironment() {
return Environment(F.getEmptyMap());
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h Sat Apr 11 10:58:30 2015
@@ -127,8 +127,6 @@ public:
: Location(loc), State(state), Succs(IsSink) {
assert(isSink() == IsSink);
}
-
- ~ExplodedNode() {}
/// getLocation - Returns the edge associated with the given node.
ProgramPoint getLocation() const { return Location; }
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h Sat Apr 11 10:58:30 2015
@@ -589,8 +589,6 @@ public:
: LCtx(Ctx), Loc(s), SymMgr(symmgr),
reapedStore(nullptr, storeMgr) {}
- ~SymbolReaper() {}
-
const LocationContext *getLocationContext() const { return LCtx; }
bool isLive(SymbolRef sym);
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Sat Apr 11 10:58:30 2015
@@ -486,7 +486,6 @@ public:
}
ObjCCommonTypesHelper(CodeGen::CodeGenModule &cgm);
- ~ObjCCommonTypesHelper(){}
};
/// ObjCTypesHelper - Helper class that encapsulates lazy
@@ -595,7 +594,6 @@ public:
public:
ObjCTypesHelper(CodeGen::CodeGenModule &cgm);
- ~ObjCTypesHelper() {}
};
/// ObjCNonFragileABITypesHelper - will have all types needed by objective-c's
@@ -733,7 +731,6 @@ public:
llvm::Type *EHTypePtrTy;
ObjCNonFragileABITypesHelper(CodeGen::CodeGenModule &cgm);
- ~ObjCNonFragileABITypesHelper(){}
};
class CGObjCCommonMac : public CodeGen::CGObjCRuntime {
Modified: cfe/trunk/lib/Index/SimpleFormatContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/SimpleFormatContext.h?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/lib/Index/SimpleFormatContext.h (original)
+++ cfe/trunk/lib/Index/SimpleFormatContext.h Sat Apr 11 10:58:30 2015
@@ -44,8 +44,6 @@ public:
Diagnostics->setClient(new IgnoringDiagConsumer, true);
}
- ~SimpleFormatContext() { }
-
FileID createInMemoryFile(StringRef Name, StringRef Content) {
std::unique_ptr<llvm::MemoryBuffer> Source =
llvm::MemoryBuffer::getMemBuffer(Content);
Modified: cfe/trunk/lib/Rewrite/RewriteRope.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/RewriteRope.cpp?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/RewriteRope.cpp (original)
+++ cfe/trunk/lib/Rewrite/RewriteRope.cpp Sat Apr 11 10:58:30 2015
@@ -89,9 +89,9 @@ namespace {
bool IsLeaf;
RopePieceBTreeNode(bool isLeaf) : Size(0), IsLeaf(isLeaf) {}
- ~RopePieceBTreeNode() {}
- public:
+ ~RopePieceBTreeNode() = default;
+ public:
bool isLeaf() const { return IsLeaf; }
unsigned size() const { return Size; }
Modified: cfe/trunk/utils/TableGen/NeonEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/NeonEmitter.cpp?rev=234689&r1=234688&r2=234689&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/NeonEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/NeonEmitter.cpp Sat Apr 11 10:58:30 2015
@@ -1563,8 +1563,6 @@ std::pair<Type, std::string> Intrinsic::
// See the documentation in arm_neon.td for a description of these operators.
class LowHalf : public SetTheory::Operator {
public:
- void anchor() override {}
- ~LowHalf() override {}
void apply(SetTheory &ST, DagInit *Expr, SetTheory::RecSet &Elts,
ArrayRef<SMLoc> Loc) override {
SetTheory::RecSet Elts2;
@@ -1574,8 +1572,6 @@ std::pair<Type, std::string> Intrinsic::
};
class HighHalf : public SetTheory::Operator {
public:
- void anchor() override {}
- ~HighHalf() override {}
void apply(SetTheory &ST, DagInit *Expr, SetTheory::RecSet &Elts,
ArrayRef<SMLoc> Loc) override {
SetTheory::RecSet Elts2;
@@ -1588,8 +1584,6 @@ std::pair<Type, std::string> Intrinsic::
public:
Rev(unsigned ElementSize) : ElementSize(ElementSize) {}
- void anchor() override {}
- ~Rev() override {}
void apply(SetTheory &ST, DagInit *Expr, SetTheory::RecSet &Elts,
ArrayRef<SMLoc> Loc) override {
SetTheory::RecSet Elts2;
@@ -1613,8 +1607,6 @@ std::pair<Type, std::string> Intrinsic::
public:
MaskExpander(unsigned N) : N(N) {}
- void anchor() override {}
- ~MaskExpander() override {}
void expand(SetTheory &ST, Record *R, SetTheory::RecSet &Elts) override {
unsigned Addend = 0;
if (R->getName() == "mask0")
More information about the cfe-commits
mailing list