Try not to violate conventions immediately before explaining them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164278
91177308-0d34-0410-b5e6-
96231b3b80d8
- /// ListContainsFoo - Return true if the specified list has an element that is
+ /// containsFoo - Return true if the specified list has an element that is
- static bool ListContainsFoo(const std::vector<Bar*> &List) {
+ static bool containsFoo(const std::vector<Bar*> &List) {
for (unsigned i = 0, e = List.size(); i != e; ++i)
if (List[i]->isFoo())
return true;
for (unsigned i = 0, e = List.size(); i != e; ++i)
if (List[i]->isFoo())
return true;
- if (ListContainsFoo(BarList)) {
+ if (containsFoo(BarList)) {
};
} // end anonymous namespace
};
} // end anonymous namespace
+ static void runHelper() {
bool operator<(const char *RHS) const;
};
bool operator<(const char *RHS) const;
};
} // end anonymous namespace
} // end anonymous namespace
-This is bad specifically because if you're looking at "``Helper``" in the middle
+This is bad specifically because if you're looking at "``runHelper``" in the middle
of a large C++ file, that you have no immediate way to tell if it is local to
the file. When it is marked static explicitly, this is immediately obvious.
Also, there is no reason to enclose the definition of "``operator<``" in the
of a large C++ file, that you have no immediate way to tell if it is local to
the file. When it is marked static explicitly, this is immediately obvious.
Also, there is no reason to enclose the definition of "``operator<``" in the