mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
Use only explicit bool conversion operators
BitVector/SmallBitVector::reference::operator bool remain implicit since they model more exactly a bool, rather than something else that can be boolean tested. The most common (non-buggy) case are where such objects are used as return expressions in bool-returning functions or as boolean function arguments. In those cases I've used (& added if necessary) a named function to provide the equivalent (or sometimes negative, depending on convenient wording) test. One behavior change (YAMLParser) was made, though no test case is included as I'm not sure how to reach that code path. Essentially any comparison of llvm::yaml::document_iterators would be invalid if neither iterator was at the end. This helped uncover a couple of bugs in Clang - test cases provided for those in a separate commit along with similar changes to `operator bool` instances in Clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181868 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -98,7 +98,7 @@ protected:
|
||||
|
||||
void compileAndRun(int ExpectedRC = OriginalRC) {
|
||||
// This function shouldn't be called until after SetUp.
|
||||
ASSERT_TRUE(0 != TheJIT);
|
||||
ASSERT_TRUE(TheJIT.isValid());
|
||||
ASSERT_TRUE(0 != Main);
|
||||
|
||||
TheJIT->finalizeObject();
|
||||
|
Reference in New Issue
Block a user