Exemplo n.º 1
0
 private static void GenerateExternalMethodWarnings(SourceMethodSymbol methodSymbol, DiagnosticBag diagnostics)
 {
     if (methodSymbol.GetAttributes().IsEmpty && !methodSymbol.ContainingType.IsComImport)
     {
         // external method with no attributes
         var errorCode = (methodSymbol.MethodKind == MethodKind.Constructor || methodSymbol.MethodKind == MethodKind.StaticConstructor) ?
             ErrorCode.WRN_ExternCtorNoImplementation :
             ErrorCode.WRN_ExternMethodNoImplementation;
         diagnostics.Add(errorCode, methodSymbol.Locations[0], methodSymbol);
     }
 }