summaryrefslogtreecommitdiffstats
path: root/clang/utils
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2015-01-23 15:36:10 +0000
committerAlexander Kornienko <alexfh@google.com>2015-01-23 15:36:10 +0000
commit6ee521c7eb8b58b5b1faf471bf03da434440bcf0 (patch)
treedebfb1a2045dd04609ceb921e847776a30f7f37a /clang/utils
parentd486e09d8ee612f6de2feac7fbeac16588e2dde7 (diff)
downloadbcm5719-llvm-6ee521c7eb8b58b5b1faf471bf03da434440bcf0.tar.gz
bcm5719-llvm-6ee521c7eb8b58b5b1faf471bf03da434440bcf0.zip
Replace size() calls on containers with empty() calls where appropriate. NFC
http://reviews.llvm.org/D7090 Patch by Gábor Horváth! llvm-svn: 226914
Diffstat (limited to 'clang/utils')
-rw-r--r--clang/utils/TableGen/ClangAttrEmitter.cpp4
-rw-r--r--clang/utils/TableGen/NeonEmitter.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp
index a73be2e0815..83629ec3605 100644
--- a/clang/utils/TableGen/ClangAttrEmitter.cpp
+++ b/clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -1207,7 +1207,7 @@ writePrettyPrintFunction(Record &R,
static unsigned
getSpellingListIndex(const std::vector<FlattenedSpelling> &SpellingList,
const FlattenedSpelling &Spelling) {
- assert(SpellingList.size() && "Spelling list is empty!");
+ assert(!SpellingList.empty() && "Spelling list is empty!");
for (unsigned Index = 0; Index < SpellingList.size(); ++Index) {
const FlattenedSpelling &S = SpellingList[Index];
@@ -1231,7 +1231,7 @@ static void writeAttrAccessorDefinition(const Record &R, raw_ostream &OS) {
std::vector<FlattenedSpelling> Spellings =
GetFlattenedSpellings(*Accessor);
std::vector<FlattenedSpelling> SpellingList = GetFlattenedSpellings(R);
- assert(SpellingList.size() &&
+ assert(!SpellingList.empty() &&
"Attribute with empty spelling list can't have accessors!");
OS << " bool " << Name << "() const { return SpellingListIndex == ";
diff --git a/clang/utils/TableGen/NeonEmitter.cpp b/clang/utils/TableGen/NeonEmitter.cpp
index a8e8e394194..d243672119e 100644
--- a/clang/utils/TableGen/NeonEmitter.cpp
+++ b/clang/utils/TableGen/NeonEmitter.cpp
@@ -1393,7 +1393,7 @@ void Intrinsic::emitBody(StringRef CallPrefix) {
}
}
- assert(Lines.size() && "Empty def?");
+ assert(!Lines.empty() && "Empty def?");
if (!RetVar.getType().isVoid())
Lines.back().insert(0, RetVar.getName() + " = ");
OpenPOWER on IntegriCloud