summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Tooling
diff options
context:
space:
mode:
authorAhmed Charles <ahmedcharles@gmail.com>2014-03-07 19:51:06 +0000
committerAhmed Charles <ahmedcharles@gmail.com>2014-03-07 19:51:06 +0000
commitd72a5f103da45e5abe10497308fce5aeb992cdc2 (patch)
tree306cc66d0705d54685ef7cee0fa0000c898f3dcc /clang/unittests/Tooling
parent571e2fecf85b3d89a419e5f8416115400b2d8b5f (diff)
downloadbcm5719-llvm-d72a5f103da45e5abe10497308fce5aeb992cdc2.tar.gz
bcm5719-llvm-d72a5f103da45e5abe10497308fce5aeb992cdc2.zip
Replace OwningPtr::isValid() with conversion to bool.
This is a precursor to moving to std::unique_ptr. llvm-svn: 203277
Diffstat (limited to 'clang/unittests/Tooling')
-rw-r--r--clang/unittests/Tooling/CompilationDatabaseTest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/unittests/Tooling/CompilationDatabaseTest.cpp b/clang/unittests/Tooling/CompilationDatabaseTest.cpp
index 4920d6d66bb..9260e621b38 100644
--- a/clang/unittests/Tooling/CompilationDatabaseTest.cpp
+++ b/clang/unittests/Tooling/CompilationDatabaseTest.cpp
@@ -455,7 +455,7 @@ TEST(ParseFixedCompilationDatabase, ReturnsArgumentsAfterDoubleDash) {
};
OwningPtr<FixedCompilationDatabase> Database(
FixedCompilationDatabase::loadFromCommandLine(Argc, Argv));
- ASSERT_TRUE(Database.isValid());
+ ASSERT_TRUE((bool)Database);
std::vector<CompileCommand> Result =
Database->getCompileCommands("source");
ASSERT_EQ(1ul, Result.size());
@@ -474,7 +474,7 @@ TEST(ParseFixedCompilationDatabase, ReturnsEmptyCommandLine) {
const char *Argv[] = { "1", "2", "--\0no-constant-folding" };
OwningPtr<FixedCompilationDatabase> Database(
FixedCompilationDatabase::loadFromCommandLine(Argc, Argv));
- ASSERT_TRUE(Database.isValid());
+ ASSERT_TRUE((bool)Database);
std::vector<CompileCommand> Result =
Database->getCompileCommands("source");
ASSERT_EQ(1ul, Result.size());
@@ -491,7 +491,7 @@ TEST(ParseFixedCompilationDatabase, HandlesPositionalArgs) {
int Argc = sizeof(Argv) / sizeof(char*);
OwningPtr<FixedCompilationDatabase> Database(
FixedCompilationDatabase::loadFromCommandLine(Argc, Argv));
- ASSERT_TRUE(Database.isValid());
+ ASSERT_TRUE((bool)Database);
std::vector<CompileCommand> Result =
Database->getCompileCommands("source");
ASSERT_EQ(1ul, Result.size());
@@ -510,7 +510,7 @@ TEST(ParseFixedCompilationDatabase, HandlesArgv0) {
int Argc = sizeof(Argv) / sizeof(char*);
OwningPtr<FixedCompilationDatabase> Database(
FixedCompilationDatabase::loadFromCommandLine(Argc, Argv));
- ASSERT_TRUE(Database.isValid());
+ ASSERT_TRUE((bool)Database);
std::vector<CompileCommand> Result =
Database->getCompileCommands("source");
ASSERT_EQ(1ul, Result.size());
OpenPOWER on IntegriCloud