Skip to content

Commit

Permalink
[clang] Fix a -Wcast-qual GCC warning. NFC.
Browse files Browse the repository at this point in the history
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";
      |                         ^~~~
  • Loading branch information
mstorsjo committed Oct 28, 2022
1 parent fe5b7d9 commit 83b97b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/AST/Interp/Disasm.cpp
Expand Up @@ -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 << "<<expr>>\n";
}
Expand Down

0 comments on commit 83b97b3

Please sign in to comment.