shafik added inline comments.
================ Comment at: source/Plugins/Platform/MacOSX/PlatformDarwin.cpp:1405 - llvm::StringRef version_part; - - if (sdk_name.startswith(sdk_strings[(int)desired_type])) { - version_part = - sdk_name.drop_front(strlen(sdk_strings[(int)desired_type])); - } else { + if (!sdk_name.startswith(sdk_strings[(int)desired_type])) return false; ---------------- Could we avoid C-style casts, and in this case use `static_cast` although in this case it is obvious, using explicit casts avoids bugs in the long-term due to changes in type and cv-qualifiers etc... and makes your intent clear. I personally would advocate for -Wold-style-cast being a hard error in C++ code. ================ Comment at: source/Plugins/Platform/MacOSX/PlatformDarwin.cpp:1408 + auto version_part = + sdk_name.drop_front(strlen(sdk_strings[(int)desired_type])); + version_part.consume_back(".sdk"); ---------------- Same comment here. https://reviews.llvm.org/D53677 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits