forked from OSchip/llvm-project
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. llvm-svn: 234689
This commit is contained in:
parent
dd0ff85701
commit
8017237277
|
@ -159,7 +159,7 @@ private:
|
|||
const BaseOffsetsMapTy& BaseOffsets,
|
||||
const VBaseOffsetsMapTy& VBaseOffsets);
|
||||
|
||||
~ASTRecordLayout() {}
|
||||
~ASTRecordLayout() = default;
|
||||
|
||||
void Destroy(ASTContext &Ctx);
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ class VariantMatcher {
|
|||
ArrayRef<VariantMatcher> InnerMatchers) const;
|
||||
|
||||
protected:
|
||||
~MatcherOps() {}
|
||||
~MatcherOps() = default;
|
||||
|
||||
private:
|
||||
ast_type_traits::ASTNodeKind NodeKind;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -449,7 +449,7 @@ private:
|
|||
const char **Annotations, unsigned NumAnnotations,
|
||||
StringRef ParentName,
|
||||
const char *BriefComment);
|
||||
~CodeCompletionString() { }
|
||||
~CodeCompletionString() = default;
|
||||
|
||||
friend class CodeCompletionBuilder;
|
||||
friend class CodeCompletionResult;
|
||||
|
|
|
@ -106,7 +106,6 @@ private:
|
|||
|
||||
public:
|
||||
EnvironmentManager(llvm::BumpPtrAllocator& Allocator) : F(Allocator) {}
|
||||
~EnvironmentManager() {}
|
||||
|
||||
Environment getInitialEnvironment() {
|
||||
return Environment(F.getEmptyMap());
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -1563,8 +1563,6 @@ std::pair<Type, std::string> Intrinsic::DagEmitter::emitDagShuffle(DagInit *DI){
|
|||
// 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::DagEmitter::emitDagShuffle(DagInit *DI){
|
|||
};
|
||||
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::DagEmitter::emitDagShuffle(DagInit *DI){
|
|||
|
||||
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::DagEmitter::emitDagShuffle(DagInit *DI){
|
|||
|
||||
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")
|
||||
|
|
Loading…
Reference in New Issue