diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-16 23:37:23 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-16 23:37:23 +0000 |
commit | 98d3c101ddf7e657e2dc6171860fe41f03cb0dfc (patch) | |
tree | da10d6f84ce417a6e74106812cc7a2459f3ea4df /llvm/unittests/Support | |
parent | 80a38428e560d3c73feb53736ede0c79b03687df (diff) | |
download | bcm5719-llvm-98d3c101ddf7e657e2dc6171860fe41f03cb0dfc.tar.gz bcm5719-llvm-98d3c101ddf7e657e2dc6171860fe41f03cb0dfc.zip |
Use LLVM_EXPLICIT instead of a function pointer as bool.
llvm-svn: 199437
Diffstat (limited to 'llvm/unittests/Support')
-rw-r--r-- | llvm/unittests/Support/ErrorOrTest.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/unittests/Support/ErrorOrTest.cpp b/llvm/unittests/Support/ErrorOrTest.cpp index 8a5b068d479..7a0c31f484d 100644 --- a/llvm/unittests/Support/ErrorOrTest.cpp +++ b/llvm/unittests/Support/ErrorOrTest.cpp @@ -20,7 +20,9 @@ ErrorOr<int> t2() { return errc::invalid_argument; } TEST(ErrorOr, SimpleValue) { ErrorOr<int> a = t1(); - EXPECT_TRUE(a); + // FIXME: This is probably a bug in gtest. EXPECT_TRUE should expand to + // include the !! to make it friendly to explicit bool operators. + EXPECT_TRUE(!!a); EXPECT_EQ(1, *a); ErrorOr<int> b = a; |