From 83b97b3b277281c3b90d245c7816addccc756158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 28 Oct 2022 16:10:17 +0300 Subject: [PATCH] [clang] Fix a -Wcast-qual GCC warning. NFC. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the following warning: ../tools/clang/lib/AST/Interp/Disasm.cpp: In member function ‘void clang::interp::Function::dump(llvm::raw_ostream&) const’: ../tools/clang/lib/AST/Interp/Disasm.cpp:43:25: warning: cast from type ‘const clang::interp::Function*’ to type ‘void*’ casts away qualifiers [-Wcast-qual] 43 | OS << " " << (void*)this << ":\n"; | ^~~~ --- clang/lib/AST/Interp/Disasm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/AST/Interp/Disasm.cpp b/clang/lib/AST/Interp/Disasm.cpp index db68887f0558..82debe4fcae1 100644 --- a/clang/lib/AST/Interp/Disasm.cpp +++ b/clang/lib/AST/Interp/Disasm.cpp @@ -40,7 +40,7 @@ LLVM_DUMP_METHOD void Function::dump(llvm::raw_ostream &OS) const { } else { OS << F->getDeclName(); } - OS << " " << (void*)this << ":\n"; + OS << " " << (const void*)this << ":\n"; } else { OS << "<>\n"; }