[clang] 68030f8 - [clang][bytecode][NFC] Fix printing signed IntegralAP values

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 23 23:21:46 PDT 2024


Author: Timm Bäder
Date: 2024-08-24T08:21:25+02:00
New Revision: 68030f86aef11558c9ed14a34250433f57923c84

URL: https://github.com/llvm/llvm-project/commit/68030f86aef11558c9ed14a34250433f57923c84
DIFF: https://github.com/llvm/llvm-project/commit/68030f86aef11558c9ed14a34250433f57923c84.diff

LOG: [clang][bytecode][NFC] Fix printing signed IntegralAP values

Added: 
    

Modified: 
    clang/lib/AST/ByteCode/IntegralAP.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/ByteCode/IntegralAP.h b/clang/lib/AST/ByteCode/IntegralAP.h
index 209b0af7da5f30..a4d656433344b7 100644
--- a/clang/lib/AST/ByteCode/IntegralAP.h
+++ b/clang/lib/AST/ByteCode/IntegralAP.h
@@ -153,7 +153,7 @@ template <bool Signed> class IntegralAP final {
 
   unsigned countLeadingZeros() const { return V.countl_zero(); }
 
-  void print(llvm::raw_ostream &OS) const { OS << V; }
+  void print(llvm::raw_ostream &OS) const { V.print(OS, Signed);}
   std::string toDiagnosticString(const ASTContext &Ctx) const {
     std::string NameStr;
     llvm::raw_string_ostream OS(NameStr);


        


More information about the cfe-commits mailing list