2 writes to AllowUnsafe
Microsoft.CodeAnalysis.CSharp (2)
CSharpCompilationOptions.cs (2)
226this.AllowUnsafe = allowUnsafe; 420return new CSharpCompilationOptions(this) { AllowUnsafe = enabled };
31 references to AllowUnsafe
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder_Statements.cs (1)
173if (!this.Compilation.Options.AllowUnsafe)
Binder\ExecutableCodeBinder.cs (1)
130&& compilation.Options.AllowUnsafe) // Don't cascade
Compilation\CSharpCompilation.cs (2)
4467if (Options.AllowUnsafe) 4469writeValue(CompilationOptionNames.Unsafe, Options.AllowUnsafe.ToString());
Compilation\CSharpDeterministicKeyBuilder.cs (1)
29writer.Write("unsafe", csharpOptions.AllowUnsafe);
CSharpCompilationOptions.cs (5)
239allowUnsafe: other.AllowUnsafe, 415if (enabled == this.AllowUnsafe) 742return this.AllowUnsafe == other.AllowUnsafe && 756Hash.Combine(this.AllowUnsafe,
Symbols\Attributes\AttributeData.cs (1)
265if (!compilation.Options.AllowUnsafe)
Symbols\Source\SourceAssemblySymbol.cs (2)
683if (!compilationOptions.AllowUnsafe) 1806if (_compilation.Options.AllowUnsafe)
Symbols\Source\SourceModuleSymbol.cs (1)
580if (compilation.Options.AllowUnsafe)
Symbols\SymbolExtensions.cs (1)
287return symbol.DeclaringCompilation.Options.AllowUnsafe;
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
UpdateProjectToAllowUnsafeTests.cs (1)
39Assert.True(((CSharpCompilationOptions)newSolution.Projects.Single().CompilationOptions!).AllowUnsafe);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (5)
CommandLineTests.cs (5)
5351Assert.True(parsedArgs.CompilationOptions.AllowUnsafe); 5355Assert.True(parsedArgs.CompilationOptions.AllowUnsafe); 5359Assert.False(parsedArgs.CompilationOptions.AllowUnsafe); 5363Assert.True(parsedArgs.CompilationOptions.AllowUnsafe); 5367Assert.False(parsedArgs.CompilationOptions.AllowUnsafe);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
UpdateProjectToAllowUnsafeTests.cs (1)
39Assert.True(((CSharpCompilationOptions)newSolution.Projects.Single().CompilationOptions!).AllowUnsafe);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
44pdbOptions.VerifyPdbOption("unsafe", originalOptions.AllowUnsafe);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\CSharpCompilationOptionsTests.cs (1)
116TestProperty((old, value) => old.WithAllowUnsafe(value), opt => opt.AllowUnsafe, true);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Serialization\CSharpOptionsSerializationService.cs (1)
32writer.WriteBoolean(csharpOptions.AllowUnsafe);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Workspaces\TestWorkspace_XmlCreation.cs (1)
136element.SetAttributeValue(AllowUnsafeAttributeName, csOptions.AllowUnsafe);
Microsoft.CodeAnalysis.Scripting.UnitTests (1)
ScriptOptionsTests.cs (1)
220Assert.Equal(scriptOptions.AllowUnsafe, compilation.Options.AllowUnsafe);
Microsoft.VisualStudio.LanguageServices.CSharp (4)
Utilities\CSharpCompilationOptionsChangingService.cs (4)
30return oldCSharpOptions.WithAllowUnsafe(newCSharpOptions.AllowUnsafe).WithNullableContextOptions(newCSharpOptions.NullableContextOptions) == newOptions; 38if (newCSharpOptions.AllowUnsafe != oldCSharpOptions.AllowUnsafe) 41newCSharpOptions.AllowUnsafe);