summaryrefslogtreecommitdiff
path: root/lib/Option/ArgList.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-04-15 06:32:26 +0000
committerCraig Topper <craig.topper@gmail.com>2014-04-15 06:32:26 +0000
commit0b6cb7104b15504cd41f48cc2babcbcee70775f3 (patch)
tree48f97597536aa35e8e2b80b8e25e049821ca7e13 /lib/Option/ArgList.cpp
parenteb19b8f58b12532e736051fee46dcf2115a4888d (diff)
downloadllvm-0b6cb7104b15504cd41f48cc2babcbcee70775f3.tar.gz
llvm-0b6cb7104b15504cd41f48cc2babcbcee70775f3.tar.bz2
llvm-0b6cb7104b15504cd41f48cc2babcbcee70775f3.tar.xz
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206252 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Option/ArgList.cpp')
-rw-r--r--lib/Option/ArgList.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Option/ArgList.cpp b/lib/Option/ArgList.cpp
index fecd237173..1b013f2c02 100644
--- a/lib/Option/ArgList.cpp
+++ b/lib/Option/ArgList.cpp
@@ -60,11 +60,11 @@ Arg *ArgList::getLastArgNoClaim(OptSpecifier Id) const {
for (const_reverse_iterator it = rbegin(), ie = rend(); it != ie; ++it)
if ((*it)->getOption().matches(Id))
return *it;
- return 0;
+ return nullptr;
}
Arg *ArgList::getLastArg(OptSpecifier Id) const {
- Arg *Res = 0;
+ Arg *Res = nullptr;
for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
if ((*it)->getOption().matches(Id)) {
Res = *it;
@@ -76,7 +76,7 @@ Arg *ArgList::getLastArg(OptSpecifier Id) const {
}
Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1) const {
- Arg *Res = 0;
+ Arg *Res = nullptr;
for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
if ((*it)->getOption().matches(Id0) ||
(*it)->getOption().matches(Id1)) {
@@ -91,7 +91,7 @@ Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1) const {
Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
OptSpecifier Id2) const {
- Arg *Res = 0;
+ Arg *Res = nullptr;
for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
if ((*it)->getOption().matches(Id0) ||
(*it)->getOption().matches(Id1) ||
@@ -106,7 +106,7 @@ Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
OptSpecifier Id2, OptSpecifier Id3) const {
- Arg *Res = 0;
+ Arg *Res = nullptr;
for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
if ((*it)->getOption().matches(Id0) ||
(*it)->getOption().matches(Id1) ||
@@ -123,7 +123,7 @@ Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
OptSpecifier Id2, OptSpecifier Id3,
OptSpecifier Id4) const {
- Arg *Res = 0;
+ Arg *Res = nullptr;
for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
if ((*it)->getOption().matches(Id0) ||
(*it)->getOption().matches(Id1) ||
@@ -141,7 +141,7 @@ Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
OptSpecifier Id2, OptSpecifier Id3,
OptSpecifier Id4, OptSpecifier Id5) const {
- Arg *Res = 0;
+ Arg *Res = nullptr;
for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
if ((*it)->getOption().matches(Id0) ||
(*it)->getOption().matches(Id1) ||
@@ -161,7 +161,7 @@ Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
OptSpecifier Id2, OptSpecifier Id3,
OptSpecifier Id4, OptSpecifier Id5,
OptSpecifier Id6) const {
- Arg *Res = 0;
+ Arg *Res = nullptr;
for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
if ((*it)->getOption().matches(Id0) ||
(*it)->getOption().matches(Id1) ||
@@ -182,7 +182,7 @@ Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
OptSpecifier Id2, OptSpecifier Id3,
OptSpecifier Id4, OptSpecifier Id5,
OptSpecifier Id6, OptSpecifier Id7) const {
- Arg *Res = 0;
+ Arg *Res = nullptr;
for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
if ((*it)->getOption().matches(Id0) ||
(*it)->getOption().matches(Id1) ||