Author: Timm Bäder Date: 2024-04-16T13:29:41+02:00 New Revision: a8de3ee8994023ea7669397587f8118ae5bba9c9
URL: https://github.com/llvm/llvm-project/commit/a8de3ee8994023ea7669397587f8118ae5bba9c9 DIFF: https://github.com/llvm/llvm-project/commit/a8de3ee8994023ea7669397587f8118ae5bba9c9.diff LOG: [clang][Interp][NFC] Fix some build warnings Fixes: /buildbot/worker/arc-folder/llvm-project/clang/lib/AST/Interp/Disasm.cpp:143:25: warning: cast from type 'const clang::interp::Block*' to type 'void*' casts away qualifiers [-Wcast-qual] /buildbot/worker/arc-folder/llvm-project/clang/lib/AST/Interp/Disasm.cpp:271:23: warning: cast from type 'const clang::interp::Block*' to type 'void*' casts away qualifiers [-Wcast-qual] Added: Modified: clang/lib/AST/Interp/Disasm.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/Disasm.cpp b/clang/lib/AST/Interp/Disasm.cpp index ebc4e4f195ba62..d127f33223e802 100644 --- a/clang/lib/AST/Interp/Disasm.cpp +++ b/clang/lib/AST/Interp/Disasm.cpp @@ -140,7 +140,7 @@ LLVM_DUMP_METHOD void Program::dump(llvm::raw_ostream &OS) const { const Descriptor *Desc = G->block()->getDescriptor(); Pointer GP = getPtrGlobal(GI); - OS << GI << ": " << (void *)G->block() << " "; + OS << GI << ": " << (const void *)G->block() << " "; { ColorScope SC(OS, true, GP.isInitialized() @@ -268,7 +268,7 @@ LLVM_DUMP_METHOD void Record::dump(llvm::raw_ostream &OS, unsigned Indentation, LLVM_DUMP_METHOD void Block::dump(llvm::raw_ostream &OS) const { { ColorScope SC(OS, true, {llvm::raw_ostream::BRIGHT_BLUE, true}); - OS << "Block " << (void *)this << "\n"; + OS << "Block " << (const void *)this << "\n"; } unsigned NPointers = 0; for (const Pointer *P = Pointers; P; P = P->Next) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits