3 writes to Flags
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder.cs (3)
34this.Flags = compilation.Options.TopLevelBinderFlags; 42this.Flags = next.Flags; 55this.Flags = flags;
96 references to Flags
Microsoft.CodeAnalysis.CSharp (96)
Binder\Binder.cs (10)
42this.Flags = next.Flags; 63return this.Flags.Includes(BinderFlags.SemanticModel); 72return this.Flags.Includes(BinderFlags.EarlyAttributeBinding); 113RoslynDebug.Assert(!this.Flags.Includes(BinderFlags.UncheckedRegion | BinderFlags.CheckedRegion)); 115return this.Flags.Includes(BinderFlags.CheckedRegion) 117: this.Flags.Includes(BinderFlags.UncheckedRegion) 228internal bool InExpressionTree => (Flags & BinderFlags.InExpressionTree) == BinderFlags.InExpressionTree; 611ReportDiagnosticsIfObsolete(diagnostics, symbol, node, hasBaseReceiver, this.ContainingMemberOrLambda, this.ContainingType, this.Flags); 785return this.Flags.Includes(BinderFlags.IgnoreAccessibility) || AccessCheck.IsSymbolAccessible(symbol, within, ref useSiteInfo, throughTypeOpt); 796if (this.Flags.Includes(BinderFlags.IgnoreAccessibility))
Binder\Binder.ValueChecks.cs (1)
1631return Flags.Includes(BinderFlags.ObjectInitializerMember) && receiver.Kind == BoundKind.ObjectOrCollectionValuePlaceholder ||
Binder\Binder_Await.cs (7)
138return this.Flags.Includes(BinderFlags.InCatchFilter) || 139this.Flags.Includes(BinderFlags.InLockBody); 205if (this.InUnsafeRegion && !this.Flags.Includes(BinderFlags.AllowAwaitInUnsafeContext)) 210else if (this.Flags.Includes(BinderFlags.InLockBody)) 215else if (this.Flags.Includes(BinderFlags.InCatchFilter)) 220else if (this.Flags.Includes(BinderFlags.InFinallyBlock) && 226else if (this.Flags.Includes(BinderFlags.InCatchBlock) &&
Binder\Binder_Constraints.cs (1)
32Debug.Assert(this.Flags.Includes(BinderFlags.GenericConstraintsClause));
Binder\Binder_Crefs.cs (3)
83Debug.Assert(Flags.Includes(BinderFlags.Cref)); 967this.Compilation.GetBinderFactory(typeSyntax.SyntaxTree).GetBinder(typeSyntax).Flags == 968(parameterOrReturnTypeBinder.Flags & ~BinderFlags.SemanticModel));
Binder\Binder_Expressions.cs (11)
66get { return this.Flags.Includes(BinderFlags.FieldInitializer); } 71get { return this.Flags.Includes(BinderFlags.ParameterDefaultValue); } 76get { return this.Flags.Includes(BinderFlags.ConstructorInitializer); } 81get { return this.Flags.Includes(BinderFlags.AttributeArgument); } 86get { return this.Flags.Includes(BinderFlags.Cref); } 91get { return InCref && !this.Flags.Includes(BinderFlags.CrefParameterOrReturnType); } 1458Debug.Assert((this.Flags & BinderFlags.InContextualAttributeBinder) != 0); 4536if (this.Flags.IncludesAny(BinderFlags.InCatchBlock | BinderFlags.InCatchFilter | BinderFlags.InFinallyBlock)) 6416Debug.Assert(collectionInitializerAddMethodBinder.Flags.Includes(BinderFlags.CollectionInitializerAddMethod)); 8061(Flags.Includes(BinderFlags.CollectionExpressionConversionValidation | BinderFlags.CollectionInitializerAddMethod) && name is ParameterSyntax)) 8811ErrorCode errorCode = this.Flags.Includes(BinderFlags.ObjectInitializerMember) ?
Binder\Binder_Flags.cs (10)
66return this.Flags == flags 73return this.Flags.Includes(flags) 75: new Binder(this, this.Flags | flags); 91return new BinderWithContainingMemberOrLambda(this, this.Flags | flags, containing); 102if (this.Flags.Includes(BinderFlags.UnsafeRegion)) 105? new Binder(this, this.Flags & ~BinderFlags.UnsafeRegion) 110? new Binder(this, this.Flags | BinderFlags.UnsafeRegion) 116Debug.Assert(!this.Flags.Includes(BinderFlags.UncheckedRegion | BinderFlags.CheckedRegion)); 121return this.Flags.Includes(added) 123: new Binder(this, (this.Flags & ~removed) | added);
Binder\Binder_Invocation.cs (1)
1600if (Flags.Includes(BinderFlags.ParameterDefaultValue))
Binder\Binder_Lookup.cs (2)
1351&& (this.Flags & BinderFlags.InEEMethodBinder) == 0) 1688if (this.Flags.Includes(BinderFlags.IgnoreAccessibility))
Binder\Binder_Operators.cs (1)
2543bool allowManagedAddressOf = Flags.Includes(BinderFlags.AllowMoveableAddressOf);
Binder\Binder_Statements.cs (6)
254if (this.Flags.Includes(BinderFlags.InFinallyBlock)) 258else if (this.Flags.Includes(BinderFlags.InTryBlockOfTryCatch)) 262else if (this.Flags.Includes(BinderFlags.InCatchBlock)) 281if (this.Flags.Includes(BinderFlags.InFinallyBlock)) 444else if (!this.Flags.Includes(BinderFlags.InCatchBlock)) 449else if (this.Flags.Includes(BinderFlags.InNestedFinallyBlock))
Binder\Binder_Symbols.cs (5)
596if (!Flags.HasFlag(BinderFlags.SuppressConstraintChecks)) 1236else if ((Flags & BinderFlags.SuppressTypeArgumentBinding) != 0) 1579return !this.Flags.Includes(BinderFlags.SuppressConstraintChecks); 2073else if (this.Flags.Includes(BinderFlags.IgnoreCorLibraryDuplicatedTypes) && 2650if ((binder.Flags & BinderFlags.InContextualAttributeBinder) != 0)
Binder\Binder_Unsafe.cs (2)
23get { return this.Flags.Includes(BinderFlags.UnsafeRegion); } 55if (this.Flags.Includes(BinderFlags.SuppressUnsafeDiagnostics))
Binder\BlockBinder.cs (2)
22: this(enclosing, block, enclosing.Flags) 27: base(enclosing, enclosing.Flags | additionalFlags)
Binder\CatchClauseBinder.cs (1)
21: base(enclosing, (enclosing.Flags | BinderFlags.InCatchBlock) & ~BinderFlags.InNestedFinallyBlock)
Binder\CollectionInitializerAddMethodBinder.cs (1)
18: base(next, next.Flags | BinderFlags.CollectionInitializerAddMethod)
Binder\ConstantFieldsInProgressBinder.cs (1)
19: base(next, BinderFlags.FieldInitializer | next.Flags)
Binder\ContextualAttributeBinder.cs (1)
26: base(enclosing, enclosing.Flags | BinderFlags.InContextualAttributeBinder)
Binder\EarlyWellKnownAttributeBinder.cs (1)
22: base(enclosing, enclosing.Flags | BinderFlags.EarlyAttributeBinding)
Binder\EmbeddedStatementBinder.cs (1)
25: base(enclosing, enclosing.Flags)
Binder\ExecutableCodeBinder.cs (2)
33: this(root, memberSymbol, next, next.Flags) 39: base(next, (next.Flags | additionalFlags) & ~BinderFlags.AllClearedAtExecutableCodeBoundary)
Binder\ForEachLoopBinder.cs (1)
578builder.Build(this.Flags),
Binder\ImplicitlyTypedFieldBinder.cs (1)
25: base(next, next.Flags)
Binder\InMethodBinder.cs (3)
41: base(enclosing, enclosing.Flags & ~BinderFlags.AllClearedAtExecutableCodeBoundary) 43Debug.Assert(!enclosing.Flags.Includes(BinderFlags.InCatchFilter)); 210if ((this.Flags & BinderFlags.InEEMethodBinder) != 0 && parameter.Type.IsDisplayClassType())
Binder\LocalBinderFactory.cs (4)
222if ((_enclosing.Flags & BinderFlags.InContextualAttributeBinder) != 0) 289Debug.Assert((current.Flags & BinderFlags.InContextualAttributeBinder) != 0); 912if (_enclosing.Flags.Includes(BinderFlags.InCatchBlock)) 920Debug.Assert(_map.TryGetValue(node.Block, out finallyBinder) && finallyBinder.Flags.Includes(BinderFlags.InFinallyBlock));
Binder\LocalScopeBinder.cs (1)
26: this(next, next.Flags)
Binder\ParamsCollectionTypeInProgressBinder.cs (1)
20: base(next, next.Flags | BinderFlags.CollectionExpressionConversionValidation)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
677if (_binder.InAttributeArgument || (_binder.Flags & BinderFlags.InContextualAttributeBinder) != 0) 1315if (binder.Flags.HasFlag(BinderFlags.AttributeArgument) && !type.IsSZArray())
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (3)
311if (HadBadArguments(diagnostics, binder, name, receiver, arguments, symbols, location, binder.Flags, isMethodGroupConversion)) 508if ((binder.Flags & BinderFlags.CollectionExpressionConversionValidation) != 0) 664else if (binder.Flags.Includes(BinderFlags.CollectionInitializerAddMethod))
Binder\SimpleProgramBinder.cs (1)
21: base(enclosing, enclosing.Flags)
Binder\SimpleProgramUnitBinder.cs (1)
21: base(enclosing, enclosing.Flags)
Binder\TypeofBinder.cs (1)
29: base(next, next.Flags | BinderFlags.UnsafeRegion)
Compilation\CSharpSemanticModel.cs (2)
259if (bindingOption == SpeculativeBindingOption.BindAsTypeOrNamespace || binder.Flags.Includes(BinderFlags.CrefParameterOrReturnType)) 296if (binder.Flags.Includes(BinderFlags.CrefParameterOrReturnType))
Symbols\ConstraintsHelper.cs (2)
359Debug.Assert(!withTypeParametersBinder.Flags.Includes(BinderFlags.GenericConstraintsClause)); 397Debug.Assert(!withTypeParametersBinder.Flags.Includes(BinderFlags.GenericConstraintsClause));
Symbols\Source\SourceNamedTypeSymbol.cs (2)
350Debug.Assert(!binder.Flags.Includes(BinderFlags.GenericConstraintsClause)); 431Debug.Assert(!binder.Flags.Includes(BinderFlags.GenericConstraintsClause));
Symbols\TypeWithAnnotations.cs (1)
1184diagnostics.Add(new LazyObsoleteDiagnosticInfo(type, binder.ContainingMemberOrLambda, binder.Flags), syntax.GetLocation());