[Lldb-commits] [PATCH] D26233: Fix Clang-tidy readability-redundant-string-cstr warnings
malcolm.parsons created this revision. malcolm.parsons added a reviewer: zturner. malcolm.parsons added a subscriber: lldb-commits. Herald added subscribers: danalbert, tberghammer. https://reviews.llvm.org/D26233 Files: source/Breakpoint/BreakpointResolverAddress.cpp source/Breakpoint/BreakpointResolverFileLine.cpp source/Commands/CommandCompletions.cpp source/Commands/CommandObjectBreakpoint.cpp source/Commands/CommandObjectCommands.cpp source/Commands/CommandObjectFrame.cpp source/Commands/CommandObjectPlatform.cpp source/Commands/CommandObjectSource.cpp source/Commands/CommandObjectTarget.cpp source/Core/Broadcaster.cpp source/Core/Debugger.cpp source/Core/Disassembler.cpp source/Core/FormatEntity.cpp source/Core/Log.cpp source/Core/Module.cpp source/Core/Scalar.cpp source/Core/SearchFilter.cpp source/Core/StructuredData.cpp source/Core/ValueObject.cpp source/DataFormatters/TypeSummary.cpp source/Expression/IRDynamicChecks.cpp source/Expression/REPL.cpp source/Host/common/FileSpec.cpp source/Host/common/Host.cpp source/Host/common/HostNativeThreadBase.cpp source/Host/common/Symbols.cpp source/Host/common/ThisThread.cpp source/Host/linux/HostInfoLinux.cpp source/Host/posix/PipePosix.cpp source/Interpreter/CommandInterpreter.cpp source/Interpreter/OptionValueArray.cpp source/Interpreter/OptionValueDictionary.cpp source/Interpreter/OptionValueFileSpec.cpp source/Interpreter/OptionValueFileSpecLIst.cpp source/Interpreter/OptionValuePathMappings.cpp source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp source/Plugins/ExpressionParser/Clang/ASTDumper.cpp source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp source/Plugins/ExpressionParser/Clang/IRForTarget.cpp source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp source/Plugins/Platform/Android/AdbClient.cpp source/Plugins/Platform/Android/PlatformAndroid.cpp source/Plugins/Platform/MacOSX/PlatformDarwin.cpp source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp source/Plugins/Process/Linux/NativeProcessLinux.cpp source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp source/Symbol/ClangASTContext.cpp source/Symbol/ObjectFile.cpp source/Symbol/SymbolContext.cpp source/Target/Platform.cpp source/Target/ProcessLaunchInfo.cpp source/Target/TargetList.cpp source/Utility/ModuleCache.cpp tools/lldb-server/Acceptor.cpp tools/lldb-server/lldb-platform.cpp unittests/Host/SocketTest.cpp unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp Index: unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp === --- unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp +++ unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp @@ -487,7 +487,7 @@ std::string sizeof_var = "sizeof_"; sizeof_var.append(Enum); -EXPECT_EQ(GetGlobalConstantInteger(session, sizeof_var.c_str()), +EXPECT_EQ(GetGlobalConstantInteger(session, sizeof_var), enum_type->GetByteSize()); } } @@ -535,7 +535,7 @@ std::string sizeof_var = "sizeof_"; sizeof_var.append(Typedef); -EXPECT_EQ(GetGlobalConstantInteger(session, sizeof_var.c_str()), +EXPECT_EQ(GetGlobalConstantInteger(session, sizeof_var), typedef_type->GetByteSize()); } } Index: unittests/Host/SocketTest.cpp === --- unittests/Host/SocketTest.cpp +++ unittests/Host/SocketTest.cpp @@ -79,7 +79,7 @@ std::unique_ptr connect_socket_up( new SocketType(child_processes_inherit, error)); EXPECT_FALSE(error.Fail()); -error = connect_socket_up->Connect(connect_remote_address.c_str()); +error = c
[Lldb-commits] [PATCH] D26233: Fix Clang-tidy readability-redundant-string-cstr warnings
malcolm.parsons added a comment. In https://reviews.llvm.org/D26233#586005, @zturner wrote: > Nice improvement. I assume you ran the test suite and everything passed? I think a change like this would fail to compile if it was wrong. check-lldb passed: == Issue Details = UNEXPECTED SUCCESS: test_continue_in_watchpoint_command_dwarf (functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py) UNEXPECTED SUCCESS: test_continue_in_watchpoint_command_dwo (functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py) UNEXPECTED SUCCESS: test_dwarf (functionalities/thread/exit_during_break/TestExitDuringBreak.py) UNEXPECTED SUCCESS: test_dwo (functionalities/thread/exit_during_break/TestExitDuringBreak.py) UNEXPECTED SUCCESS: test_sb_api_listener_resume_dwarf (api/multithreaded/TestMultithreaded.py) UNEXPECTED SUCCESS: test_sb_api_listener_resume_dwo (api/multithreaded/TestMultithreaded.py) UNEXPECTED SUCCESS: test_with_dwarf (lang/cpp/printf/TestPrintf.py) UNEXPECTED SUCCESS: test_with_dwo (lang/cpp/printf/TestPrintf.py) Test Result Summary === Test Methods: 1868 Reruns:0 Success:1099 Expected Failure:116 Failure: 0 Error: 0 Exceptional Exit: 0 Unexpected Success:8 Skip:645 Timeout: 0 Expected Timeout: 0 [100%] Built target check-lldb Repository: rL LLVM https://reviews.llvm.org/D26233 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r285855 - Fix Clang-tidy readability-redundant-string-cstr warnings
Author: malcolm.parsons Date: Wed Nov 2 15:34:10 2016 New Revision: 285855 URL: http://llvm.org/viewvc/llvm-project?rev=285855&view=rev Log: Fix Clang-tidy readability-redundant-string-cstr warnings Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 Modified: lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp lldb/trunk/source/Commands/CommandCompletions.cpp lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp lldb/trunk/source/Commands/CommandObjectCommands.cpp lldb/trunk/source/Commands/CommandObjectFrame.cpp lldb/trunk/source/Commands/CommandObjectPlatform.cpp lldb/trunk/source/Commands/CommandObjectSource.cpp lldb/trunk/source/Commands/CommandObjectTarget.cpp lldb/trunk/source/Core/Broadcaster.cpp lldb/trunk/source/Core/Debugger.cpp lldb/trunk/source/Core/Disassembler.cpp lldb/trunk/source/Core/FormatEntity.cpp lldb/trunk/source/Core/Log.cpp lldb/trunk/source/Core/Module.cpp lldb/trunk/source/Core/Scalar.cpp lldb/trunk/source/Core/SearchFilter.cpp lldb/trunk/source/Core/StructuredData.cpp lldb/trunk/source/Core/ValueObject.cpp lldb/trunk/source/DataFormatters/TypeSummary.cpp lldb/trunk/source/Expression/IRDynamicChecks.cpp lldb/trunk/source/Expression/REPL.cpp lldb/trunk/source/Host/common/FileSpec.cpp lldb/trunk/source/Host/common/Host.cpp lldb/trunk/source/Host/common/HostNativeThreadBase.cpp lldb/trunk/source/Host/common/Symbols.cpp lldb/trunk/source/Host/common/ThisThread.cpp lldb/trunk/source/Host/linux/HostInfoLinux.cpp lldb/trunk/source/Host/posix/PipePosix.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp lldb/trunk/source/Interpreter/OptionValueArray.cpp lldb/trunk/source/Interpreter/OptionValueDictionary.cpp lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp lldb/trunk/source/Interpreter/OptionValueFileSpecLIst.cpp lldb/trunk/source/Interpreter/OptionValuePathMappings.cpp lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp lldb/trunk/source/Symbol/ClangASTContext.cpp lldb/trunk/source/Symbol/ObjectFile.cpp lldb/trunk/source/Symbol/SymbolContext.cpp lldb/trunk/source/Target/Platform.cpp lldb/trunk/source/Target/ProcessLaunchInfo.cpp lldb/trunk/source/Target/TargetList.cpp lldb/trunk/source/Utility/ModuleCache.cpp lldb/trunk/tools/lldb-server/Acceptor.cpp lldb/trunk/tools/lldb-server/lldb-platform.cpp lldb/trunk/unittests/Host/SocketTest.cpp lldb/trunk/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp Modified: lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp U
[Lldb-commits] [PATCH] D26233: Fix Clang-tidy readability-redundant-string-cstr warnings
This revision was automatically updated to reflect the committed changes. Closed by commit rL285855: Fix Clang-tidy readability-redundant-string-cstr warnings (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26233?vs=76679&id=76776#toc Repository: rL LLVM https://reviews.llvm.org/D26233 Files: lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp lldb/trunk/source/Commands/CommandCompletions.cpp lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp lldb/trunk/source/Commands/CommandObjectCommands.cpp lldb/trunk/source/Commands/CommandObjectFrame.cpp lldb/trunk/source/Commands/CommandObjectPlatform.cpp lldb/trunk/source/Commands/CommandObjectSource.cpp lldb/trunk/source/Commands/CommandObjectTarget.cpp lldb/trunk/source/Core/Broadcaster.cpp lldb/trunk/source/Core/Debugger.cpp lldb/trunk/source/Core/Disassembler.cpp lldb/trunk/source/Core/FormatEntity.cpp lldb/trunk/source/Core/Log.cpp lldb/trunk/source/Core/Module.cpp lldb/trunk/source/Core/Scalar.cpp lldb/trunk/source/Core/SearchFilter.cpp lldb/trunk/source/Core/StructuredData.cpp lldb/trunk/source/Core/ValueObject.cpp lldb/trunk/source/DataFormatters/TypeSummary.cpp lldb/trunk/source/Expression/IRDynamicChecks.cpp lldb/trunk/source/Expression/REPL.cpp lldb/trunk/source/Host/common/FileSpec.cpp lldb/trunk/source/Host/common/Host.cpp lldb/trunk/source/Host/common/HostNativeThreadBase.cpp lldb/trunk/source/Host/common/Symbols.cpp lldb/trunk/source/Host/common/ThisThread.cpp lldb/trunk/source/Host/linux/HostInfoLinux.cpp lldb/trunk/source/Host/posix/PipePosix.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp lldb/trunk/source/Interpreter/OptionValueArray.cpp lldb/trunk/source/Interpreter/OptionValueDictionary.cpp lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp lldb/trunk/source/Interpreter/OptionValueFileSpecLIst.cpp lldb/trunk/source/Interpreter/OptionValuePathMappings.cpp lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp lldb/trunk/source/Symbol/ClangASTContext.cpp lldb/trunk/source/Symbol/ObjectFile.cpp lldb/trunk/source/Symbol/SymbolContext.cpp lldb/trunk/source/Target/Platform.cpp lldb/trunk/source/Target/ProcessLaunchInfo.cpp lldb/trunk/source/Target/TargetList.cpp lldb/trunk/source/Utility/ModuleCache.cpp lldb/trunk/tools/lldb-server/Acceptor.cpp lldb/trunk/tools/lldb-server/lldb-platform.cpp lldb/trunk/unittests/Host/SocketTest.cpp lldb/trunk/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp Index: lldb/trunk/unittests/Host/SocketTest.cpp === --- lldb/trunk/unittests/Host/SocketTest.cpp +++ lldb/trunk/unittests/Host/SocketTest.cpp @@ -79,7 +79,7 @@ std::uniq