Author: Raphael Isemann
Date: 2026-08-13T21:07:13+01:00
New Revision: 6e6e7a7383fcf4291546f559adfb1b220dc3308d

URL: 
https://github.com/llvm/llvm-project/commit/6e6e7a7383fcf4291546f559adfb1b220dc3308d
DIFF: 
https://github.com/llvm/llvm-project/commit/6e6e7a7383fcf4291546f559adfb1b220dc3308d.diff

LOG: [lldb] Make SBFile::operator bool explicit (#215819)

Every other SB class in the API declares `explicit operator bool()`.
SBFile was the only one with an implicit conversion, which in general is
not something we want.

Added: 
    

Modified: 
    lldb/include/lldb/API/SBFile.h

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/API/SBFile.h b/lldb/include/lldb/API/SBFile.h
index 8cf4fe1b405fa..c73a134e34d22 100644
--- a/lldb/include/lldb/API/SBFile.h
+++ b/lldb/include/lldb/API/SBFile.h
@@ -43,7 +43,7 @@ class LLDB_API SBFile {
   bool IsValid() const;
   SBError Close();
 
-  operator bool() const;
+  explicit operator bool() const;
 #ifndef SWIG
   bool operator!() const;
 #endif


        
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to