[Lldb-commits] [PATCH] D72190: Removing C-style casts in favor of explict C++ style casts
Shafik Yaghmour via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 3 16:47:06 PST 2020
shafik created this revision.
shafik added reviewers: teemperor, JDevlieghere, labath.
C-style casts hide intent and when code changes they can also hide logic errors.
This change converts most of the C-style cast into `static_cast` and the icky ones are converted to `reinterpret_cast` and we can deal with fixing those icky cases in another change.
One case was moved to use `std::numeric_limits<unsigned>::max()` since it was simply using the fact that `-1` converted to `unsigned` results in the maximum unsigned value.
https://reviews.llvm.org/D72190
Files:
lldb/include/lldb/Breakpoint/BreakpointOptions.h
lldb/include/lldb/Breakpoint/BreakpointResolver.h
lldb/include/lldb/Core/SearchFilter.h
lldb/include/lldb/Core/Value.h
lldb/include/lldb/DataFormatters/TypeSynthetic.h
lldb/include/lldb/Expression/IRExecutionUnit.h
lldb/include/lldb/Symbol/Symbol.h
lldb/source/Expression/IRExecutionUnit.cpp
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72190.236151.patch
Type: text/x-patch
Size: 10993 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200104/f88c35d3/attachment-0001.bin>
More information about the lldb-commits
mailing list