summaryrefslogtreecommitdiff
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/find-unprefixed-members.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/clang/find-unprefixed-members.cxx b/clang/find-unprefixed-members.cxx
index 677966a0..d3d65b36 100644
--- a/clang/find-unprefixed-members.cxx
+++ b/clang/find-unprefixed-members.cxx
@@ -260,8 +260,8 @@ public:
const std::vector<RenameResult>& rResults = aVisitor.getResults();
// Ignore missing prefixes in structs without member functions.
bool bFound = false;
- if (m_rContext.getYaml())
- std::cerr << "---" << std::endl;
+ // Will this be the first YAML line?
+ bool bFirst = true;
for (const std::string& rFunction : rFunctions)
{
for (const RenameResult& rResult : rResults)
@@ -270,6 +270,12 @@ public:
{
if (m_rContext.getYaml())
{
+ if (bFirst)
+ {
+ bFirst = false;
+ if (m_rContext.getYaml())
+ std::cerr << "---" << std::endl;
+ }
std::cerr << "- QualifiedName: " << rResult.m_aScope
<< "::" << rResult.m_aOldName << std::endl;
std::cerr << " NewName: " << rResult.m_aNewName << std::endl;
@@ -281,7 +287,8 @@ public:
}
}
}
- if (m_rContext.getYaml())
+ if (!bFirst && m_rContext.getYaml())
+ // There were some YAML lines.
std::cerr << "..." << std::endl;
if (bFound)
exit(1);