[PATCH] D25667: Fix call sites with spurious .c_str() calls from explicit StringRef conversion (NFC)

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 16 23:07:04 PDT 2016


mehdi_amini created this revision.
mehdi_amini added a reviewer: zturner.
mehdi_amini added a subscriber: llvm-commits.
Herald added subscribers: danalbert, tberghammer, jholewinski.

This update all call-sites where .c_str() is spuriously called
during conversion to StringRef(). This is a follow up to https://reviews.llvm.org/D25639,
now that the conversion are explicit and easy to spot.

Was generated by runnign the following over the codebase:

  sed -i '' 's/llvm::StringRef(\(.*\)->c_str())/*\1/' $file; done
  sed -i '' 's/StringRef(\(.*\)->c_str())/*\1/' $file; done
  sed -i '' 's/llvm::StringRef(\(.*\).c_str())/\1/' $file; done
  sed -i '' 's/StringRef(\(.*\).c_str())/\1/' $file; done


https://reviews.llvm.org/D25667

Files:
  clang-tools-extra/clang-query/tool/ClangQuery.cpp
  clang/lib/CodeGen/CGObjCGNU.cpp
  clang/lib/CodeGen/TargetInfo.cpp
  clang/lib/Driver/Driver.cpp
  clang/lib/Driver/Job.cpp
  clang/lib/Driver/ToolChain.cpp
  clang/lib/Driver/Tools.cpp
  clang/lib/Frontend/CompilerInstance.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/lib/Frontend/FrontendActions.cpp
  clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
  clang/lib/Frontend/Rewrite/RewriteObjC.cpp
  clang/lib/Lex/PPDirectives.cpp
  clang/lib/Parse/ParseDeclCXX.cpp
  clang/lib/StaticAnalyzer/Checkers/ValistChecker.cpp
  clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
  clang/unittests/AST/ASTImporterTest.cpp
  lldb/source/API/SBHostOS.cpp
  lldb/source/Breakpoint/BreakpointResolverAddress.cpp
  lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
  lldb/source/Commands/CommandCompletions.cpp
  lldb/source/Commands/CommandObjectBreakpoint.cpp
  lldb/source/Commands/CommandObjectCommands.cpp
  lldb/source/Commands/CommandObjectFrame.cpp
  lldb/source/Commands/CommandObjectPlatform.cpp
  lldb/source/Commands/CommandObjectSource.cpp
  lldb/source/Commands/CommandObjectTarget.cpp
  lldb/source/Core/Broadcaster.cpp
  lldb/source/Core/Debugger.cpp
  lldb/source/Core/Disassembler.cpp
  lldb/source/Core/FormatEntity.cpp
  lldb/source/Core/Log.cpp
  lldb/source/Core/Module.cpp
  lldb/source/Core/Scalar.cpp
  lldb/source/Core/SearchFilter.cpp
  lldb/source/Core/StructuredData.cpp
  lldb/source/Core/ValueObject.cpp
  lldb/source/DataFormatters/TypeSummary.cpp
  lldb/source/Expression/IRDynamicChecks.cpp
  lldb/source/Expression/REPL.cpp
  lldb/source/Host/common/FileSpec.cpp
  lldb/source/Host/common/Host.cpp
  lldb/source/Host/common/HostNativeThreadBase.cpp
  lldb/source/Host/common/Symbols.cpp
  lldb/source/Host/common/ThisThread.cpp
  lldb/source/Host/macosx/Host.mm
  lldb/source/Host/macosx/HostInfoMacOSX.mm
  lldb/source/Host/macosx/Symbols.cpp
  lldb/source/Host/posix/PipePosix.cpp
  lldb/source/Interpreter/CommandInterpreter.cpp
  lldb/source/Interpreter/OptionValueArray.cpp
  lldb/source/Interpreter/OptionValueDictionary.cpp
  lldb/source/Interpreter/OptionValueFileSpec.cpp
  lldb/source/Interpreter/OptionValueFileSpecLIst.cpp
  lldb/source/Interpreter/OptionValuePathMappings.cpp
  lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
  lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
  lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
  lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
  lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
  lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
  lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
  lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
  lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp
  lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
  lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
  lldb/source/Symbol/ClangASTContext.cpp
  lldb/source/Symbol/ObjectFile.cpp
  lldb/source/Symbol/SymbolContext.cpp
  lldb/source/Target/Platform.cpp
  lldb/source/Target/ProcessLaunchInfo.cpp
  lldb/source/Target/TargetList.cpp
  lldb/source/Utility/ModuleCache.cpp
  lldb/tools/lldb-server/Acceptor.cpp
  lldb/unittests/Host/SocketTest.cpp
  lldb/unittests/Process/minidump/MinidumpParserTest.cpp
  lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
  llvm/lib/MC/ELFObjectWriter.cpp
  llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
  llvm/tools/lto/lto.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25667.74816.patch
Type: text/x-patch
Size: 86769 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161017/41b41b99/attachment.bin>


More information about the llvm-commits mailing list