summaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorAngel Garcia Gomez <angelgarcia@google.com>2015-10-20 12:52:55 +0000
committerAngel Garcia Gomez <angelgarcia@google.com>2015-10-20 12:52:55 +0000
commite83bf34da93785210fe557b00803b6b91caa48b5 (patch)
tree502b3fe0c38b22db90840c60f90d3f57f381d084 /include/clang
parent617486165258f102f9c8f6e4b8c7d368dfc77773 (diff)
downloadclang-e83bf34da93785210fe557b00803b6b91caa48b5.tar.gz
Apply modernize-use-default to clang.
Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: bkramer, klimek Subscribers: klimek, alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13890 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/AST/ASTConsumer.h2
-rw-r--r--include/clang/AST/CanonicalType.h4
-rw-r--r--include/clang/AST/DeclFriend.h2
-rw-r--r--include/clang/AST/DeclTemplate.h2
-rw-r--r--include/clang/AST/Expr.h4
-rw-r--r--include/clang/AST/ExprCXX.h2
-rw-r--r--include/clang/AST/Mangle.h2
-rw-r--r--include/clang/AST/MangleNumberingContext.h2
-rw-r--r--include/clang/AST/Redeclarable.h2
-rw-r--r--include/clang/AST/StmtIterator.h2
-rw-r--r--include/clang/AST/UnresolvedSet.h2
-rw-r--r--include/clang/AST/VTableBuilder.h2
-rw-r--r--include/clang/ASTMatchers/ASTMatchersInternal.h12
-rw-r--r--include/clang/Analysis/Analyses/FormatString.h2
-rw-r--r--include/clang/Analysis/Analyses/LiveVariables.h2
-rw-r--r--include/clang/Analysis/Analyses/ReachableCode.h2
-rw-r--r--include/clang/Analysis/Analyses/ThreadSafetyTraverse.h2
-rw-r--r--include/clang/Analysis/Analyses/UninitializedValues.h2
-rw-r--r--include/clang/Analysis/AnalysisContext.h8
-rw-r--r--include/clang/Analysis/CFG.h4
-rw-r--r--include/clang/Basic/FileSystemStatCache.h2
-rw-r--r--include/clang/Basic/IdentifierTable.h2
-rw-r--r--include/clang/Driver/Job.h2
-rw-r--r--include/clang/Edit/EditsReceiver.h2
-rw-r--r--include/clang/Frontend/SerializedDiagnosticReader.h4
-rw-r--r--include/clang/Frontend/VerifyDiagnosticConsumer.h2
-rw-r--r--include/clang/Lex/ModuleMap.h2
-rw-r--r--include/clang/Lex/PTHLexer.h2
-rw-r--r--include/clang/Lex/PreprocessorLexer.h2
-rw-r--r--include/clang/Sema/Sema.h6
-rw-r--r--include/clang/Sema/TypoCorrection.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h4
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/BugType.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/Store.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h4
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h2
-rw-r--r--include/clang/Tooling/FileMatchTrie.h2
-rw-r--r--include/clang/Tooling/Tooling.h2
44 files changed, 60 insertions, 60 deletions
diff --git a/include/clang/AST/ASTConsumer.h b/include/clang/AST/ASTConsumer.h
index b2730e4622..02669e9bd1 100644
--- a/include/clang/AST/ASTConsumer.h
+++ b/include/clang/AST/ASTConsumer.h
@@ -43,7 +43,7 @@ class ASTConsumer {
public:
ASTConsumer() : SemaConsumer(false) { }
- virtual ~ASTConsumer() {}
+ virtual ~ASTConsumer() = default;
/// Initialize - This is called to initialize the consumer, providing the
/// ASTContext.
diff --git a/include/clang/AST/CanonicalType.h b/include/clang/AST/CanonicalType.h
index b25800bfed..6e0f88ee7d 100644
--- a/include/clang/AST/CanonicalType.h
+++ b/include/clang/AST/CanonicalType.h
@@ -333,7 +333,7 @@ template<typename T>
class CanProxy : public CanProxyAdaptor<T> {
public:
/// \brief Build a NULL proxy.
- CanProxy() { }
+ CanProxy() = default;
/// \brief Build a proxy to the given canonical type.
CanProxy(CanQual<T> Stored) { this->Stored = Stored; }
@@ -389,7 +389,7 @@ struct CanTypeIterator
CanQualType,
typename std::iterator_traits<InputIterator>::difference_type,
CanProxy<Type>, CanQualType> {
- CanTypeIterator() {}
+ CanTypeIterator() = default;
explicit CanTypeIterator(InputIterator Iter)
: CanTypeIterator::iterator_adaptor_base(std::move(Iter)) {}
diff --git a/include/clang/AST/DeclFriend.h b/include/clang/AST/DeclFriend.h
index 12b93b408a..5bd6da8797 100644
--- a/include/clang/AST/DeclFriend.h
+++ b/include/clang/AST/DeclFriend.h
@@ -180,7 +180,7 @@ class CXXRecordDecl::friend_iterator {
friend class CXXRecordDecl;
explicit friend_iterator(FriendDecl *Ptr) : Ptr(Ptr) {}
public:
- friend_iterator() {}
+ friend_iterator() = default;
typedef FriendDecl *value_type;
typedef FriendDecl *reference;
diff --git a/include/clang/AST/DeclTemplate.h b/include/clang/AST/DeclTemplate.h
index bd38ac8823..3c6ef81442 100644
--- a/include/clang/AST/DeclTemplate.h
+++ b/include/clang/AST/DeclTemplate.h
@@ -664,7 +664,7 @@ protected:
typename std::iterator_traits<typename llvm::FoldingSetVector<
EntryType>::iterator>::iterator_category,
DeclType *, ptrdiff_t, DeclType *, DeclType *> {
- SpecIterator() {}
+ SpecIterator() = default;
explicit SpecIterator(
typename llvm::FoldingSetVector<EntryType>::iterator SetIter)
: SpecIterator::iterator_adaptor_base(std::move(SetIter)) {}
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h
index cc1fc0ae18..2e5de8768f 100644
--- a/include/clang/AST/Expr.h
+++ b/include/clang/AST/Expr.h
@@ -337,7 +337,7 @@ public:
{}
public:
- Classification() {}
+ Classification() = default;
Kinds getKind() const { return static_cast<Kinds>(Kind); }
ModifiableType getModifiable() const {
@@ -4076,7 +4076,7 @@ public:
friend class DesignatedInitExpr;
public:
- Designator() {}
+ Designator() = default;
/// @brief Initializes a field designator.
Designator(const IdentifierInfo *FieldName, SourceLocation DotLoc,
diff --git a/include/clang/AST/ExprCXX.h b/include/clang/AST/ExprCXX.h
index e8493f1933..45d852ae0e 100644
--- a/include/clang/AST/ExprCXX.h
+++ b/include/clang/AST/ExprCXX.h
@@ -2278,7 +2278,7 @@ public:
: Expr(ArrayTypeTraitExprClass, Empty), ATT(0), Value(false),
QueriedType() { }
- virtual ~ArrayTypeTraitExpr() { }
+ virtual ~ArrayTypeTraitExpr() = default;
SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
SourceLocation getLocEnd() const LLVM_READONLY { return RParen; }
diff --git a/include/clang/AST/Mangle.h b/include/clang/AST/Mangle.h
index 7b725b65ca..29d79592e5 100644
--- a/include/clang/AST/Mangle.h
+++ b/include/clang/AST/Mangle.h
@@ -64,7 +64,7 @@ public:
ManglerKind Kind)
: Context(Context), Diags(Diags), Kind(Kind) {}
- virtual ~MangleContext() { }
+ virtual ~MangleContext() = default;
ASTContext &getASTContext() const { return Context; }
diff --git a/include/clang/AST/MangleNumberingContext.h b/include/clang/AST/MangleNumberingContext.h
index 7a818557fd..fd15e1a98b 100644
--- a/include/clang/AST/MangleNumberingContext.h
+++ b/include/clang/AST/MangleNumberingContext.h
@@ -32,7 +32,7 @@ class VarDecl;
/// literals within a particular context.
class MangleNumberingContext : public RefCountedBase<MangleNumberingContext> {
public:
- virtual ~MangleNumberingContext() {}
+ virtual ~MangleNumberingContext() = default;
/// \brief Retrieve the mangling number of a new lambda expression with the
/// given call operator within this context.
diff --git a/include/clang/AST/Redeclarable.h b/include/clang/AST/Redeclarable.h
index 92046d582b..fd397bec0a 100644
--- a/include/clang/AST/Redeclarable.h
+++ b/include/clang/AST/Redeclarable.h
@@ -248,7 +248,7 @@ Decl *getPrimaryMergedDecl(Decl *D);
template<typename decl_type>
class Mergeable {
public:
- Mergeable() {}
+ Mergeable() = default;
/// \brief Return the first declaration of this declaration or itself if this
/// is the only declaration.
diff --git a/include/clang/AST/StmtIterator.h b/include/clang/AST/StmtIterator.h
index 81f8ad4344..ced6ac8316 100644
--- a/include/clang/AST/StmtIterator.h
+++ b/include/clang/AST/StmtIterator.h
@@ -81,7 +81,7 @@ class StmtIteratorImpl : public StmtIteratorBase,
protected:
StmtIteratorImpl(const StmtIteratorBase& RHS) : StmtIteratorBase(RHS) {}
public:
- StmtIteratorImpl() {}
+ StmtIteratorImpl() = default;
StmtIteratorImpl(Stmt **s) : StmtIteratorBase(s) {}
StmtIteratorImpl(Decl **dgi, Decl **dge) : StmtIteratorBase(dgi, dge) {}
StmtIteratorImpl(const VariableArrayType *t) : StmtIteratorBase(t) {}
diff --git a/include/clang/AST/UnresolvedSet.h b/include/clang/AST/UnresolvedSet.h
index 26ee1cf71c..af2f30fe34 100644
--- a/include/clang/AST/UnresolvedSet.h
+++ b/include/clang/AST/UnresolvedSet.h
@@ -59,7 +59,7 @@ class UnresolvedSetImpl {
// UnresolvedSet.
private:
template <unsigned N> friend class UnresolvedSet;
- UnresolvedSetImpl() {}
+ UnresolvedSetImpl() = default;
UnresolvedSetImpl(const UnresolvedSetImpl &) {}
public:
diff --git a/include/clang/AST/VTableBuilder.h b/include/clang/AST/VTableBuilder.h
index 481fd11d6a..385a817303 100644
--- a/include/clang/AST/VTableBuilder.h
+++ b/include/clang/AST/VTableBuilder.h
@@ -298,7 +298,7 @@ public:
bool isMicrosoft() const { return IsMicrosoftABI; }
- virtual ~VTableContextBase() {}
+ virtual ~VTableContextBase() = default;
protected:
typedef llvm::DenseMap<const CXXMethodDecl *, ThunkInfoVectorTy> ThunksMapTy;
diff --git a/include/clang/ASTMatchers/ASTMatchersInternal.h b/include/clang/ASTMatchers/ASTMatchersInternal.h
index 8e1abc6f77..e703319f61 100644
--- a/include/clang/ASTMatchers/ASTMatchersInternal.h
+++ b/include/clang/ASTMatchers/ASTMatchersInternal.h
@@ -131,7 +131,7 @@ public:
/// BoundNodesTree.
class Visitor {
public:
- virtual ~Visitor() {}
+ virtual ~Visitor() = default;
/// \brief Called multiple times during a single call to VisitMatches(...).
///
@@ -209,7 +209,7 @@ public:
template <typename T>
class MatcherInterface : public DynMatcherInterface {
public:
- ~MatcherInterface() override {}
+ ~MatcherInterface() override = default;
/// \brief Returns true if 'Node' can be matched.
///
@@ -798,7 +798,7 @@ public:
AMM_ParentOnly
};
- virtual ~ASTMatchFinder() {}
+ virtual ~ASTMatchFinder() = default;
/// \brief Returns true if the given class is directly or indirectly derived
/// from a base type matching \c base.
@@ -1376,7 +1376,7 @@ class VariadicDynCastAllOfMatcher
BindableMatcher<SourceT>, Matcher<TargetT>,
makeDynCastAllOfComposite<SourceT, TargetT> > {
public:
- VariadicDynCastAllOfMatcher() {}
+ VariadicDynCastAllOfMatcher() = default;
};
/// \brief A \c VariadicAllOfMatcher<T> object is a variadic functor that takes
@@ -1394,7 +1394,7 @@ class VariadicAllOfMatcher : public llvm::VariadicFunction<
BindableMatcher<T>, Matcher<T>,
makeAllOfComposite<T> > {
public:
- VariadicAllOfMatcher() {}
+ VariadicAllOfMatcher() = default;
};
/// \brief Matches nodes of type \c TLoc for which the inner
@@ -1515,7 +1515,7 @@ public:
struct Func : public llvm::VariadicFunction<Self, Matcher<InnerTBase>,
&Self::create> {
- Func() {}
+ Func() = default;
};
private:
diff --git a/include/clang/Analysis/Analyses/FormatString.h b/include/clang/Analysis/Analyses/FormatString.h
index 4471311a33..fbcc8a5fbf 100644
--- a/include/clang/Analysis/Analyses/FormatString.h
+++ b/include/clang/Analysis/Analyses/FormatString.h
@@ -606,7 +606,7 @@ enum PositionContext { FieldWidthPos = 0, PrecisionPos = 1 };
class FormatStringHandler {
public:
- FormatStringHandler() {}
+ FormatStringHandler() = default;
virtual ~FormatStringHandler();
virtual void HandleNullChar(const char *nullCharacter) {}
diff --git a/include/clang/Analysis/Analyses/LiveVariables.h b/include/clang/Analysis/Analyses/LiveVariables.h
index e17f73a61f..c6c0ece13b 100644
--- a/include/clang/Analysis/Analyses/LiveVariables.h
+++ b/include/clang/Analysis/Analyses/LiveVariables.h
@@ -53,7 +53,7 @@ public:
class Observer {
virtual void anchor();
public:
- virtual ~Observer() {}
+ virtual ~Observer() = default;
/// A callback invoked right before invoking the
/// liveness transfer function on the given statement.
diff --git a/include/clang/Analysis/Analyses/ReachableCode.h b/include/clang/Analysis/Analyses/ReachableCode.h
index 4c523bfc8b..a388cc9fec 100644
--- a/include/clang/Analysis/Analyses/ReachableCode.h
+++ b/include/clang/Analysis/Analyses/ReachableCode.h
@@ -48,7 +48,7 @@ enum UnreachableKind {
class Callback {
virtual void anchor();
public:
- virtual ~Callback() {}
+ virtual ~Callback() = default;
virtual void HandleUnreachable(UnreachableKind UK,
SourceLocation L,
SourceRange ConditionVal,
diff --git a/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h b/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h
index 705fe910d0..5bf0ea496b 100644
--- a/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h
+++ b/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h
@@ -176,7 +176,7 @@ template <class Self>
class VisitReducer : public Traversal<Self, VisitReducerBase>,
public VisitReducerBase {
public:
- VisitReducer() {}
+ VisitReducer() = default;
public:
R_SExpr reduceNull() { return true; }
diff --git a/include/clang/Analysis/Analyses/UninitializedValues.h b/include/clang/Analysis/Analyses/UninitializedValues.h
index 53ff20c235..18ed02dd2e 100644
--- a/include/clang/Analysis/Analyses/UninitializedValues.h
+++ b/include/clang/Analysis/Analyses/UninitializedValues.h
@@ -99,7 +99,7 @@ public:
class UninitVariablesHandler {
public:
- UninitVariablesHandler() {}
+ UninitVariablesHandler() = default;
virtual ~UninitVariablesHandler();
/// Called when the uninitialized variable is used at the given expression.
diff --git a/include/clang/Analysis/AnalysisContext.h b/include/clang/Analysis/AnalysisContext.h
index 931190e43a..124ec3dda5 100644
--- a/include/clang/Analysis/AnalysisContext.h
+++ b/include/clang/Analysis/AnalysisContext.h
@@ -44,7 +44,7 @@ namespace idx { class TranslationUnit; }
/// to AnalysisDeclContext.
class ManagedAnalysis {
protected:
- ManagedAnalysis() {}
+ ManagedAnalysis() = default;
public:
virtual ~ManagedAnalysis();
@@ -289,7 +289,7 @@ class StackFrameContext : public LocationContext {
Block(blk), Index(idx) {}
public:
- ~StackFrameContext() override {}
+ ~StackFrameContext() override = default;
const Stmt *getCallSite() const { return CallSite; }
@@ -324,7 +324,7 @@ class ScopeContext : public LocationContext {
: LocationContext(Scope, ctx, parent), Enter(s) {}
public:
- ~ScopeContext() override {}
+ ~ScopeContext() override = default;
void Profile(llvm::FoldingSetNodeID &ID) override;
@@ -352,7 +352,7 @@ class BlockInvocationContext : public LocationContext {
: LocationContext(Block, ctx, parent), BD(bd), ContextData(contextData) {}
public:
- ~BlockInvocationContext() override {}
+ ~BlockInvocationContext() override = default;
const BlockDecl *getBlockDecl() const { return BD; }
diff --git a/include/clang/Analysis/CFG.h b/include/clang/Analysis/CFG.h
index 293990c88e..58e26604dc 100644
--- a/include/clang/Analysis/CFG.h
+++ b/include/clang/Analysis/CFG.h
@@ -704,11 +704,11 @@ public:
/// operator error is found when building the CFG.
class CFGCallback {
public:
- CFGCallback() {}
+ CFGCallback() = default;
virtual void compareAlwaysTrue(const BinaryOperator *B, bool isAlwaysTrue) {}
virtual void compareBitwiseEquality(const BinaryOperator *B,
bool isAlwaysTrue) {}
- virtual ~CFGCallback() {}
+ virtual ~CFGCallback() = default;
};
/// CFG - Represents a source-level, intra-procedural CFG that represents the
diff --git a/include/clang/Basic/FileSystemStatCache.h b/include/clang/Basic/FileSystemStatCache.h
index cad9189348..430851df67 100644
--- a/include/clang/Basic/FileSystemStatCache.h
+++ b/include/clang/Basic/FileSystemStatCache.h
@@ -51,7 +51,7 @@ protected:
std::unique_ptr<FileSystemStatCache> NextStatCache;
public:
- virtual ~FileSystemStatCache() {}
+ virtual ~FileSystemStatCache() = default;
enum LookupResult {
CacheExists, ///< We know the file exists and its cached stat data.
diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h
index d672314f56..b0812ccd90 100644
--- a/include/clang/Basic/IdentifierTable.h
+++ b/include/clang/Basic/IdentifierTable.h
@@ -385,7 +385,7 @@ private:
void operator=(const IdentifierIterator &) = delete;
protected:
- IdentifierIterator() { }
+ IdentifierIterator() = default;
public:
virtual ~IdentifierIterator();
diff --git a/include/clang/Driver/Job.h b/include/clang/Driver/Job.h
index 263356f396..d1fd6e3465 100644
--- a/include/clang/Driver/Job.h
+++ b/include/clang/Driver/Job.h
@@ -88,7 +88,7 @@ public:
// FIXME: This really shouldn't be copyable, but is currently copied in some
// error handling in Driver::generateCompilationDiagnostics.
Command(const Command &) = default;
- virtual ~Command() {}
+ virtual ~Command() = default;
virtual void Print(llvm::raw_ostream &OS, const char *Terminator, bool Quote,
CrashReportInfo *CrashInfo = nullptr) const;
diff --git a/include/clang/Edit/EditsReceiver.h b/include/clang/Edit/EditsReceiver.h
index 600ac28ea9..1b63d0ee86 100644
--- a/include/clang/Edit/EditsReceiver.h
+++ b/include/clang/Edit/EditsReceiver.h
@@ -20,7 +20,7 @@ namespace edit {
class EditsReceiver {
public:
- virtual ~EditsReceiver() { }
+ virtual ~EditsReceiver() = default;
virtual void insert(SourceLocation loc, StringRef text) = 0;
virtual void replace(CharSourceRange range, StringRef text) = 0;
diff --git a/include/clang/Frontend/SerializedDiagnosticReader.h b/include/clang/Frontend/SerializedDiagnosticReader.h
index 3db362bf34..5c0a06f4c1 100644
--- a/include/clang/Frontend/SerializedDiagnosticReader.h
+++ b/include/clang/Frontend/SerializedDiagnosticReader.h
@@ -58,8 +58,8 @@ struct Location {
/// the various constructs that are found in serialized diagnostics.
class SerializedDiagnosticReader {
public:
- SerializedDiagnosticReader() {}
- virtual ~SerializedDiagnosticReader() {}
+ SerializedDiagnosticReader() = default;
+ virtual ~SerializedDiagnosticReader() = default;
/// \brief Read the diagnostics in \c File
std::error_code readDiagnostics(StringRef File);
diff --git a/include/clang/Frontend/VerifyDiagnosticConsumer.h b/include/clang/Frontend/VerifyDiagnosticConsumer.h
index 475f07f9dc..493dac3b11 100644
--- a/include/clang/Frontend/VerifyDiagnosticConsumer.h
+++ b/include/clang/Frontend/VerifyDiagnosticConsumer.h
@@ -161,7 +161,7 @@ public:
unsigned Min, Max;
bool MatchAnyLine;
- virtual ~Directive() { }
+ virtual ~Directive() = default;
// Returns true if directive text is valid.
// Otherwise returns false and populates E.
diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h
index 155943e545..3320843243 100644
--- a/include/clang/Lex/ModuleMap.h
+++ b/include/clang/Lex/ModuleMap.h
@@ -40,7 +40,7 @@ class ModuleMapParser;
/// reads module map files.
class ModuleMapCallbacks {
public:
- virtual ~ModuleMapCallbacks() {}
+ virtual ~ModuleMapCallbacks() = default;
/// \brief Called when a module map file has been read.
///
diff --git a/include/clang/Lex/PTHLexer.h b/include/clang/Lex/PTHLexer.h
index 904be792b2..e2e2306c0e 100644
--- a/include/clang/Lex/PTHLexer.h
+++ b/include/clang/Lex/PTHLexer.h
@@ -64,7 +64,7 @@ protected:
PTHLexer(Preprocessor& pp, FileID FID, const unsigned char *D,
const unsigned char* ppcond, PTHManager &PM);
public:
- ~PTHLexer() override {}
+ ~PTHLexer() override = default;
/// Lex - Return the next token.
bool Lex(Token &Tok);
diff --git a/include/clang/Lex/PreprocessorLexer.h b/include/clang/Lex/PreprocessorLexer.h
index 6d6cf05a96..dfc7768f62 100644
--- a/include/clang/Lex/PreprocessorLexer.h
+++ b/include/clang/Lex/PreprocessorLexer.h
@@ -81,7 +81,7 @@ protected:
ParsingFilename(false),
LexingRawMode(false) {}
- virtual ~PreprocessorLexer() {}
+ virtual ~PreprocessorLexer() = default;
virtual void IndirectLex(Token& Result) = 0;
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h
index cce5405a1e..09d6a4b850 100644
--- a/include/clang/Sema/Sema.h
+++ b/include/clang/Sema/Sema.h
@@ -1313,7 +1313,7 @@ public:
TypeDiagnoser(bool Suppressed = false) : Suppressed(Suppressed) { }
virtual void diagnose(Sema &S, SourceLocation Loc, QualType T) = 0;
- virtual ~TypeDiagnoser() {}
+ virtual ~TypeDiagnoser() = default;
};
static int getPrintable(int I) { return I; }
@@ -2297,7 +2297,7 @@ public:
virtual SemaDiagnosticBuilder diagnoseConversion(
Sema &S, SourceLocation Loc, QualType T, QualType ConvTy) = 0;
- virtual ~ContextualImplicitConverter() {}
+ virtual ~ContextualImplicitConverter() = default;
};
class ICEConvertDiagnoser : public ContextualImplicitConverter {
@@ -8597,7 +8597,7 @@ public:
virtual void diagnoseNotICE(Sema &S, SourceLocation Loc, SourceRange SR) =0;
virtual void diagnoseFold(Sema &S, SourceLocation Loc, SourceRange SR);
- virtual ~VerifyICEDiagnoser() { }
+ virtual ~VerifyICEDiagnoser() = default;
};
/// VerifyIntegerConstantExpression - Verifies that an expression is an ICE,
diff --git a/include/clang/Sema/TypoCorrection.h b/include/clang/Sema/TypoCorrection.h
index 958aab0fce..6c8a2852df 100644
--- a/include/clang/Sema/TypoCorrection.h
+++ b/include/clang/Sema/TypoCorrection.h
@@ -255,7 +255,7 @@ public:
IsObjCIvarLookup(false), IsAddressOfOperand(false), Typo(Typo),
TypoNNS(TypoNNS) {}
- virtual ~CorrectionCandidateCallback() {}
+ virtual ~CorrectionCandidateCallback() = default;
/// \brief Simple predicate used by the default RankCandidate to
/// determine whether to return an edit distance of 0 or InvalidDistance.
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
index 57c73fd6ec..b8133bfd12 100644
--- a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
+++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
@@ -57,7 +57,7 @@ public:
class NodeResolver {
virtual void anchor();
public:
- virtual ~NodeResolver() {}
+ virtual ~NodeResolver() = default;
virtual const ExplodedNode*
getOriginalNode(const ExplodedNode *N) = 0;
};
@@ -529,7 +529,7 @@ class BugReporterContext {
public:
BugReporterContext(GRBugReporter& br) : BR(br) {}
- virtual ~BugReporterContext() {}
+ virtual ~BugReporterContext() = default;
GRBugReporter& getBugReporter() { return BR; }
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
index 16226e94df..60f91de6df 100644
--- a/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
+++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
@@ -42,7 +42,7 @@ public:
BugType(const CheckerBase *checker, StringRef name, StringRef cat)
: Check(checker->getCheckName()), Name(name), Category(cat),
SuppressonSink(false) {}
- virtual ~BugType() {}
+ virtual ~BugType() = default;
// FIXME: Should these be made strings as well?
StringRef getName() const { return Name; }
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
index 35421f9455..ad083f7122 100644
--- a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
+++ b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
@@ -481,7 +481,7 @@ private:
public:
StackHintGeneratorForSymbol(SymbolRef S, StringRef M) : Sym(S), Msg(M) {}
- ~StackHintGeneratorForSymbol() override {}
+ ~StackHintGeneratorForSymbol() override = default;
/// \brief Search the call expression for the symbol Sym and dispatch the
/// 'getMessageForX()' methods to construct a specific message.
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
index cf888b5040..7fe8e3d3db 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
@@ -168,7 +168,7 @@ protected:
RegionAndSymbolInvalidationTraits *ETraits) const {}
public:
- virtual ~CallEvent() {}
+ virtual ~CallEvent() = default;
/// \brief Returns the kind of call this is.
virtual Kind getKind() const = 0;
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
index d5822e2244..368fdee4be 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
@@ -254,7 +254,7 @@ public:
assert(hasNoSinksInFrontier());
}
- virtual ~NodeBuilder() {}
+ virtual ~NodeBuilder() = default;
/// \brief Generates a node in the ExplodedGraph.
ExplodedNode *generateNode(const ProgramPoint &PP,
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
index a68d3410a8..9ae9aaf6de 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
@@ -68,7 +68,7 @@ public:
ArrayIndexTy(context.IntTy),
ArrayIndexWidth(context.getTypeSize(ArrayIndexTy)) {}
- virtual ~SValBuilder() {}
+ virtual ~SValBuilder() = default;
bool haveSameType(const SymExpr *Sym1, const SymExpr *Sym2) {
return haveSameType(Sym1->getType(), Sym2->getType());
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h b/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index a03b6306a0..b29e5f7047 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -49,7 +49,7 @@ protected:
StoreManager(ProgramStateManager &stateMgr);
public:
- virtual ~StoreManager() {}
+ virtual ~StoreManager() = default;
/// Return the value bound to specified location in a given state.
/// \param[in] store The analysis state.
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
index 741ba0e2f2..fa3f200ba8 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
@@ -43,7 +43,7 @@ class MemRegion;
class SubEngine {
virtual void anchor();
public:
- virtual ~SubEngine() {}
+ virtual ~SubEngine() = default;
virtual ProgramStateRef getInitialState(const LocationContext *InitLoc) = 0;
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
index 05de02db59..cfb7edec8e 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
@@ -57,7 +57,7 @@ protected:
SymExpr(Kind k) : K(k) {}
public:
- virtual ~SymExpr() {}
+ virtual ~SymExpr() = default;
Kind getKind() const { return K; }
@@ -109,7 +109,7 @@ protected:
SymbolData(Kind k, SymbolID sym) : SymExpr(k), Sym(sym) {}
public:
- ~SymbolData() override {}
+ ~SymbolData() override = default;
SymbolID getSymbolID() const { return Sym; }
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h
index d39b5017d3..d46efd4ef0 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h
@@ -37,7 +37,7 @@ template<> struct ProgramStateTrait<TaintMap>
class TaintManager {
- TaintManager() {}
+ TaintManager() = default;
};
}
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h b/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h
index 4f1a60e675..24d4503f37 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h
@@ -82,7 +82,7 @@ public:
class Visitor {
public:
- Visitor() {}
+ Visitor() = default;
virtual ~Visitor();
virtual bool visit(const WorkListUnit &U) = 0;
};
diff --git a/include/clang/Tooling/FileMatchTrie.h b/include/clang/Tooling/FileMatchTrie.h
index 745c164506..d7a6a379c2 100644
--- a/include/clang/Tooling/FileMatchTrie.h
+++ b/include/clang/Tooling/FileMatchTrie.h
@@ -25,7 +25,7 @@ namespace clang {
namespace tooling {
struct PathComparator {
- virtual ~PathComparator() {}
+ virtual ~PathComparator() = default;
virtual bool equivalent(StringRef FileA, StringRef FileB) const = 0;
};
class FileMatchTrieNode;
diff --git a/include/clang/Tooling/Tooling.h b/include/clang/Tooling/Tooling.h
index b7a9b25acd..ada1f526b5 100644
--- a/include/clang/Tooling/Tooling.h
+++ b/include/clang/Tooling/Tooling.h
@@ -110,7 +110,7 @@ std::unique_ptr<FrontendActionFactory> newFrontendActionFactory();
/// newFrontendActionFactory.
class SourceFileCallbacks {
public:
- virtual ~SourceFileCallbacks() {}
+ virtual ~SourceFileCallbacks() = default;
/// \brief Called before a source file is processed by a FrontEndAction.
/// \see clang::FrontendAction::BeginSourceFileAction