public bool IsMethodCallThatIsNotNull(IMethodSymbol method) { using (new OperationTimer(i => Timings.Update(TimingOperation.SymbolLookup, i))) { var reduced = method.OriginalDefinition.ReducedFrom ?? method.OriginalDefinition; if (NotNullFrameworkMethods.Contains(reduced) || ExternalNotNullMethods.Contains(reduced)) { return(true); } return(false); } }
private static void AnalyzeModel(SemanticModelAnalysisContext context) { using (new OperationTimer(i => Timings.Update(TimingOperation.ClassAnalyzer, i))) { try { SetupCustomNotNullMethods(context.SemanticModel.Compilation, context.Options); new ClassAnalyzer(context).Analyze(context.SemanticModel); } catch (ParseFailedException ex) { context.ReportDiagnostic(Diagnostic.Create(ParseFailed, ex.Location, ex.Message)); #if DEBUG throw; #endif } } }