summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/ADT/PointerSumType.h2
-rw-r--r--llvm/include/llvm/Analysis/LazyCallGraph.h2
-rw-r--r--llvm/include/llvm/Support/CommandLine.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/ADT/PointerSumType.h b/llvm/include/llvm/ADT/PointerSumType.h
index 005b1c645c9..062544eedf8 100644
--- a/llvm/include/llvm/ADT/PointerSumType.h
+++ b/llvm/include/llvm/ADT/PointerSumType.h
@@ -94,7 +94,7 @@ public:
return HelperT::template Lookup<N>::TraitsT::getFromVoidPointer(getImpl());
}
- operator bool() const { return Value & HelperT::PointerMask; }
+ explicit operator bool() const { return Value & HelperT::PointerMask; }
bool operator==(const PointerSumType &R) const { return Value == R.Value; }
bool operator!=(const PointerSumType &R) const { return Value != R.Value; }
bool operator<(const PointerSumType &R) const { return Value < R.Value; }
diff --git a/llvm/include/llvm/Analysis/LazyCallGraph.h b/llvm/include/llvm/Analysis/LazyCallGraph.h
index 566e526f89b..bca0aebe2ee 100644
--- a/llvm/include/llvm/Analysis/LazyCallGraph.h
+++ b/llvm/include/llvm/Analysis/LazyCallGraph.h
@@ -148,7 +148,7 @@ public:
///
/// This happens when an edge has been deleted. We leave the edge objects
/// around but clear them.
- operator bool() const;
+ explicit operator bool() const;
/// Returnss the \c Kind of the edge.
Kind getKind() const;
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h
index 204672f88dd..8d4ac81d294 100644
--- a/llvm/include/llvm/Support/CommandLine.h
+++ b/llvm/include/llvm/Support/CommandLine.h
@@ -201,7 +201,7 @@ public:
void reset();
- operator bool() const;
+ explicit operator bool() const;
StringRef getName() const { return Name; }
StringRef getDescription() const { return Description; }
OpenPOWER on IntegriCloud