summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-01-16 23:37:23 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-01-16 23:37:23 +0000
commite82dec5c0f6708164242192cb3c9f43e2fc6ec36 (patch)
tree3594ae10623690023128b91306b193ad66290e7e /unittests
parentad60d3c304df0562f580b31aa91480aa854b0dfe (diff)
downloadllvm-e82dec5c0f6708164242192cb3c9f43e2fc6ec36.tar.gz
llvm-e82dec5c0f6708164242192cb3c9f43e2fc6ec36.tar.bz2
llvm-e82dec5c0f6708164242192cb3c9f43e2fc6ec36.tar.xz
Use LLVM_EXPLICIT instead of a function pointer as bool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Support/ErrorOrTest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/unittests/Support/ErrorOrTest.cpp b/unittests/Support/ErrorOrTest.cpp
index 8a5b068d47..7a0c31f484 100644
--- a/unittests/Support/ErrorOrTest.cpp
+++ b/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;