mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00:00
Fix more functions in Args to use StringRef.
This patch also marks the const char* versions as =delete to prevent their use. This has the potential to cause build breakages on some platforms which I can't compile. I have tested on Windows, Linux, and OSX. Best practices for fixing broken callsites are outlined in Args.h in a comment above the deleted function declarations. Eventually we can remove these =delete declarations, but for now they are important to make sure that all implicit conversions from const char * are manually audited to make sure that they do not invoke a conversion from nullptr. llvm-svn: 281919
This commit is contained in:
1 parent
495b211a6c
commit
ecbb0bb169
34 files changed
+194
-151
No files matched your search
@@ -251,7 +251,8 @@ SBError SBPlatform::ConnectRemote(SBPlatformConnectOptions &connect_options) {
|
||||
PlatformSP platform_sp(GetSP());
|
||||
if (platform_sp && connect_options.GetURL()) {
|
||||
Args args;
|
||||
args.AppendArgument(connect_options.GetURL());
|
||||
args.AppendArgument(
|
||||
llvm::StringRef::withNullAsEmpty(connect_options.GetURL()));
|
||||
sb_error.ref() = platform_sp->ConnectRemote(args);
|
||||
} else {
|
||||
sb_error.SetErrorString("invalid platform");
|
||||
|
||||
Reference in new issue
Block a user