aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-cov
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-cov')
-rw-r--r--llvm/tools/llvm-cov/CoverageExporter.h2
-rw-r--r--llvm/tools/llvm-cov/CoverageFilters.h2
-rw-r--r--llvm/tools/llvm-cov/SourceCoverageView.h4
-rw-r--r--llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp4
4 files changed, 6 insertions, 6 deletions
diff --git a/llvm/tools/llvm-cov/CoverageExporter.h b/llvm/tools/llvm-cov/CoverageExporter.h
index 751e55d..ba946a1 100644
--- a/llvm/tools/llvm-cov/CoverageExporter.h
+++ b/llvm/tools/llvm-cov/CoverageExporter.h
@@ -37,7 +37,7 @@ protected:
: Coverage(CoverageMapping), Options(Options), OS(OS) {}
public:
- virtual ~CoverageExporter(){};
+ virtual ~CoverageExporter() = default;
/// Render the CoverageMapping object.
virtual void renderRoot(const CoverageFilters &IgnoreFilters) = 0;
diff --git a/llvm/tools/llvm-cov/CoverageFilters.h b/llvm/tools/llvm-cov/CoverageFilters.h
index 5345b0c..3cee23a 100644
--- a/llvm/tools/llvm-cov/CoverageFilters.h
+++ b/llvm/tools/llvm-cov/CoverageFilters.h
@@ -28,7 +28,7 @@ struct FunctionRecord;
/// Matches specific functions that pass the requirement of this filter.
class CoverageFilter {
public:
- virtual ~CoverageFilter() {}
+ virtual ~CoverageFilter() = default;
/// Return true if the function passes the requirements of this filter.
virtual bool matches(const coverage::CoverageMapping &CM,
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.h b/llvm/tools/llvm-cov/SourceCoverageView.h
index 43fb890a..bde187e 100644
--- a/llvm/tools/llvm-cov/SourceCoverageView.h
+++ b/llvm/tools/llvm-cov/SourceCoverageView.h
@@ -122,7 +122,7 @@ public:
static std::unique_ptr<CoveragePrinter>
create(const CoverageViewOptions &Opts);
- virtual ~CoveragePrinter() {}
+ virtual ~CoveragePrinter() = default;
/// @name File Creation Interface
/// @{
@@ -288,7 +288,7 @@ public:
create(StringRef SourceName, const MemoryBuffer &File,
const CoverageViewOptions &Options, CoverageData &&CoverageInfo);
- virtual ~SourceCoverageView() {}
+ virtual ~SourceCoverageView() = default;
/// Return the source name formatted for the host OS.
std::string getSourceName() const;
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
index c94d385..bdef099 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
@@ -955,8 +955,8 @@ void SourceCoverageViewHTML::renderLine(raw_ostream &OS, LineRef L,
// 2. Escape all of the snippets.
- for (unsigned I = 0, E = Snippets.size(); I < E; ++I)
- Snippets[I] = escape(Snippets[I], getOptions());
+ for (std::string &Snippet : Snippets)
+ Snippet = escape(Snippet, getOptions());
// 3. Use \p WrappedSegment to set the highlight for snippet 0. Use segment
// 1 to set the highlight for snippet 2, segment 2 to set the highlight for