1. 07 1月, 2015 4 次提交
  2. 24 12月, 2014 36 次提交
    • S
      - Group code fixes offered in the light bulb by the issue being fixed (as... · d3b3ea99
      shyamn 提交于
      - Group code fixes offered in the light bulb by the issue being fixed (as opposed to by the provider that supplied the fix). The order of the offered fixes should mostly remain the same as before - however, they will now be grouped differently - in most cases this will result in fewer groups in the overall list + this should make it easier to understand where fixes for one issue end and next one begins (in cases where we have fixes for more than one diagnostic on a given line)... (This addresses bug 1077181)
      
      - Stop prioritizing fixes based on whether they are fixing a warning / error / hidden diagnostic. Fixes are already being ordered (based on ExtensionOrdering as well as based on proximity to cursor) - we shouldn't allow the priority setting to interfere with this ordering. We now use priority only for ordering fixes above refactorings and for ordering everything above the suppression fixes. This should also fix the issue where the rename tracking code fix would always show up at the bottom of the list below GFU fixes. (This addresses bugs 1090799 and 1074182) (changeset 1386745)
      d3b3ea99
    • P
      Ensure that GetSemanticInfo() returns the correct members for the LHS of a... · 836df4a4
      pgavlin 提交于
      Ensure that GetSemanticInfo() returns the correct members for the LHS of a conditional access expression.
      
      The syntax node for the LHS of a conditional access expression appears in two places:
      - Inside its own BoundExpression, tracked by BoundConditionalAccess.Receiver
      - Inside the BoundConditionalReceiver that is attached to the RHS of the conditional access expression, tracked by BoundConditionalAccess.AccessExpression
      
      Or, diagramatically (let "SyntaxNode" be the syntax node for the LHS of the conditional access expression):
      
            BoundConditionalAccessExpression
            /                              \
      BoundExpression                    .....
            |                              |
        SyntaxNode               BoundConditionalReceiver
                                           |
                                       SyntaxNode
      
      This has the effect of confusing the semantic model when looking for symbol information for SyntaxNode: because the appearance of SyntaxNode in the RHS of the BoundConditionalAccessExpression is lower in the bound tree than the appearance of SyntaxNode in the LHS, the BoundConditionalReceiver associated with the RHS will be used to lookup symbols. The primary effect of this is a failure to return the actual method called in situations such as the following:
      
      class C
      {
          public int I;
      
          public static C M(long l) { return null; }
          public static C M(int i) { return null; }
      
          public static int Main()
          {
              return (int)(M(0)?.I);
          }
      }
      
      If semantic information is requested for "M" in the call to "M(0)", the returned information will contain both overloads of "M" instead of the actual overload chosen.
      
      The actual fix is simple:
      - Mark all BoundConditionalReceiver nodes as compiler generated, thus eliminating them from consideration for MemberSemanticModel.GetBoundNodes
      - Stop digging through the syntax tree for conditional expressions when getting the bindable parent node of an expression
      
      Unfortunately, the recommendation service took a dependency on seeing the BoundConditionalReceiver in the tree when requesting type information for the bound LHS of a member binding expression via SemanticModel.GetTypeInfo: if the type of the original receiver for the conditional access is T?, the type of the BoundConditionalReceiver is T. Instead of relying on this behavior, the recommendation service has been updated to perform this transformation manually.
      ***NO_CI***
       (changeset 1386679)
      836df4a4
    • M
      Fix for bug 1096385: Remove unimplemented warnings from csc\vbc that were kept for compat reasons · 72549ff8
      manishv 提交于
      There are some warnings that we havent implemented in Roslyn but have kept around because someone could have done a /nowarn and we would have complained in the past if we didnt recognize that warning number.
      
      However now that /nowarn doesnt complain about unrecognized warnings (because it needs to support userdiags) there's no point keeping them. (changeset 1386659)
      72549ff8
    • A
      VB Unstructured Exception Handling: Finish work to comply with requirement... · 2316dd75
      AlekseyTs 提交于
      VB Unstructured Exception Handling: Finish work to comply with requirement that IL shall only differ between Release and Debug. Enable/fix all Unstructured Exception Handling unit-tests.
      ***NO_CI***
       (changeset 1386638)
      2316dd75
    • M
      SyntaxGenerator changes (changeset 1386621) · f5b41926
      mattwar 提交于
      f5b41926
    • M
      Fix for bug 1095705: The analyzer driver makes duplicate callbacks for... · 3052d341
      manishv 提交于
      Fix for bug 1095705: The analyzer driver makes duplicate callbacks for FieldDeclarationSyntax nodes (https://roslyn.codeplex.com/workitem/462)
      
      We ended up making duplicate callbacks for field declarations for syntax analyzers, as the declaring node for the decl is the variable declarator within the field declaration. Fix is to make sure that we compute the topmost node used for syntax analysis for declarations.
      
      Fixes codeplex issue 462. (changeset 1386620)
      3052d341
    • A
      Simplify updating LKG compiler & analyzers by introducing "global" NuGet references · 9ee65cac
      angocke 提交于
      This changeset introduces the concept of a "global" nuget package. The references to the NuGet packages are inserted into the Open VSL.Settings.targets file, which is imported into every project in Roslyn. This ensures that every project automatically gets these "global" packages. (changeset 1386548)
      9ee65cac
    • A
      DevDiv #1075258: await in unsafe contexts · 938598fe
      acasey 提交于
      The expression compiler always allows unsafe code, so we introduce a global unsafe context into the binder chain.  Unfortunately, "await" is not allowed in unsafe contexts.  We specifically suppress the error (CS4004) because not introducing a global unsafe context would require the suppression of far more unsafe-region-required errors.
      
      There is no corresponding issue in VB, which lacks unsafe contexts.
      
      CR: chucks; ngafter; alekseyt (changeset 1386533)
      938598fe
    • J
      Paul alerted me to a bug in the first change I made to VBCSCompiler. I caused... · 0367cef3
      jaredpar 提交于
      Paul alerted me to a bug in the first change I made to VBCSCompiler.  I caused it to ignore its keepAlive value in certain situations.  This went unnoticed because there wasn't a test covering this and I fixed it, inadvertently, in a subsequent change.  This change adds a series of unit tests to track this scenario and other related ones.
      
           Additionally it changed the compiler to thread through the response file path.  The method of calculating the path in a static property using Assembly.GetEntryAssembly does not work in xUnit.  Now that the value is threaded through xUnit can pass in any directory it chooses.  Whether or not the file is on disk at that location is immaterial, compilers already have to handle the absence of this file.
      
      ***NO_CI***
       (changeset 1386527)
      0367cef3
    • K
      Fix the build to work well under OSS conditions. · 026a0382
      KevinRansom 提交于
      Mainly:
      1.   disables some tests that fail in the OSS branch.
      2.   Fakesigns the diagnostics implementation assemblies
      3.   Fakesign the TestResourcesProprietary dll, which is deployed via nuget. (changeset 1386520)
      026a0382
    • A
      DevDiv #1090458: Don't report obsolete attributes in the debugger · 0f255334
      acasey 提交于
      Covers both ObsoleteAttribute and DeprecatedAttribute.
      
      CR: chucks; ngafter; alekseyt (changeset 1386517)
      0f255334
    • A
      Anonymous Type.ToString() implementation should use overload of String.Format... · c631286d
      AlekseyTs 提交于
      Anonymous Type.ToString() implementation should use overload of String.Format that takes IFormatProvider. Also, C# implementation should explicitly call Object.ToString on each property value before passing it to the Format function, this ensures compatibility with code generated by native compiler.
      ***NO_CI***
       (changeset 1386476)
      c631286d
    • A
      VB: Prevent SemanticModel from crashing on an invalid syntax used as a type parameter. Fixes #436. · 7e1a61be
      AlekseyTs 提交于
      ***NO_CI***
       (changeset 1386442)
      7e1a61be
    • T
      EnC: Fixes synthesized member merging. The previous impl didn't handle case of... · 3c135233
      TomasMatousek 提交于
      EnC: Fixes synthesized member merging. The previous impl didn't handle case of adding non-syntheszed member after updating a method that generates a synthesized type (state machine). (changeset 1386078)
      3c135233
    • N
      0741ab9b
    • V
      Change exception filter keyword if ----> when. · 1ff04c56
      VSadov 提交于
      ***NO_CI***
       (changeset 1385867)
      1ff04c56
    • M
      SyntaxGenerator changes (changeset 1385761) · 789d7289
      mattwar 提交于
      789d7289
    • A
    • S
      Fix the expander to not crash on ?. · 9b7c6c3b
      srivatsn 提交于
      When only a simple name is allowed in a context the expander shouldn't try to expand anything. Teach the expander that in C#, a MemberBindingExpression(the thing that follows ?) can only have a simplename after it. In VB, this is just a memberaccess and so the expander already knows what to do. (changeset 1385689)
      9b7c6c3b
    • C
      19015526
    • P
      Issue warning CS0628 for protected constructors inside of sealed classes. · f82be7f5
      pgavlin 提交于
      This brings us back on par with Dev12.
      ***NO_CI***
       (changeset 1385660)
      f82be7f5
    • T
      Updates System.Collections.Immutable and System.Metadata.Reader to versions... · e8be04b7
      TomasMatousek 提交于
      Updates System.Collections.Immutable and System.Metadata.Reader to versions 1.1.33-beta and 1.0.18-beta, respectively.
           Updates VSMEF to the latest build from VSPRO_1.
      
           A few code fixes:
           - ImmutableArrayInterop is gone
             - in product we used in a couple of places where we now just create a copy of the byte[] (MetadataWriter)
             - test infrastructure uses a workaround with explicitly laid out union to avoid copies of large metadata blobs
           - EditorTestApp class was incorrectly importing MEF components resulting in a cycle. The new VSMEF reports such errors. (changeset 1385613)
      e8be04b7
    • P
      Change Color Color handling to use binding instead of lookup. · 92b896ba
      pgavlin 提交于
      The Color Color handling in the binder originally used lookup to decide the meaning of an ambiguous identifier as a simple name or type name instead of binding. This was done for two reasons:
      - Binding is more expensive than lookup
      - Binding may have side effects that are undesirable depending on how the Color Color binding is ultimately resolved
      
      Unfortunately, this is not correct: the meaning of an identifier as outlined in the spec is defined by binding. This caused the compiler to incorrectly fail to recognize Color Color in situations where a simple name or type name lookup is ambiguous but a bind of the same is not. This change replaces the lookups used in Color Color with binds, which brings Roslyn's behavior back in line with Dev12 and the spec in cases that fit such cases.
      
      This change is likely to be slightly perf-positive in cases involving a simple name that does not bind to a symbol that qualifies for the Color Color rule: in this case, the old code performed a lookup followed by a bind, whereas the new code simply performs a bind and returns the result. There is likely to be a perf penalty in a true Color Color case, however, as the bound node is larger and the new code is unconditionally binding the type even in the case where the type will not be used (whereas the old code would simply look up the type).
      ***NO_CI***
       (changeset 1385215)
      92b896ba
    • J
      Add missing entries in packages.config to a bunch of our projects. · c3ceca1b
      jasonmalinowski 提交于
      These projects were already consuming these packages in the project files, but didn't declare so in the packages.config. This brings stuff more up to sync. (changeset 1385208)
      c3ceca1b
    • T
      The IDE and the compiler didn't agree on the breakpoint span for VB let... · 54fd5167
      TomasMatousek 提交于
      The IDE and the compiler didn't agree on the breakpoint span for VB let clauses. Fixes the IDE to match the compiler. (changeset 1385141)
      54fd5167
    • J
      Delete MefV1HostServices.Default. · 407239ec
      jasonmalinowski 提交于
      This API was left in by accident from the portable MEF switch. It creates a container that is empty since it's looking for MEFv1 attributes in a MEFv2 assembly. Any use of the resulting HostServices will just fail.
      
      CR: mavasani; jaredpar (changeset 1385133)
      407239ec
    • A
      Change the hardcoded version style to include the full Roslyn semantic... · e44f79d1
      angocke 提交于
      Change the hardcoded version style to include the full Roslyn semantic version, rather than just the major version number.
      ***NO_CI***
       (changeset 1385097)
      e44f79d1
    • A
      Update the Roslyn solution to build our executables as both 32 and 64-bit. · ee555d23
      angocke 提交于
      ***NO_CI***
       (changeset 1384854)
      ee555d23
    • B
      Fixes bug 1069237 - conflict resolution doesn't work inside expression bodied... · dffcdabc
      BalajiKris 提交于
      Fixes bug 1069237 - conflict resolution doesn't work inside expression bodied lambdas. (changeset 1384823)
      dffcdabc
    • N
      Reword quoted overload resolution rule to align with proposed spec text.... · 03be7044
      nmgafter 提交于
      Reword quoted overload resolution rule to align with proposed spec text. (Comment change only) (changeset 1384807)
      03be7044
    • M
      Fix for bug 1094337: Remove /option switch in command line compilers and... · 5566daaf
      manishv 提交于
      Fix for bug 1094337: Remove /option switch in command line compilers and remove global options and culture on AnalyzerOptions
      
      Remove "/option" command line switch added for custom key-value pair analyzer options. There is no way to specify these options in the msbuild project file, so we will just revert the command line support and add it back once the end-to-end scenario is implemented for analyzer options.
      
      Additionally, also remove the Culture passed into the analyzer options. Diagnostic analyzer authors need not report localized diagnostics, just localizable diagnostics, which can be localized for any given culture by the analyzer host (IDE/command line compiler). (changeset 1384781)
      5566daaf
    • M
      Fix for bug 1089200: Previewless subclasses of CodeActionWithOptions should... · 12fdf4dd
      manishv 提交于
      Fix for bug 1089200: Previewless subclasses of CodeActionWithOptions should not require empty override of ComputeOperationsAsync(CancellationToken)
      
      Override ComputeOperationsAsync(CancellationToken) in CodeActionWithOptions to return empty operations.
      Additionally, add an internal virtual GetOperationsCoreAsync on CodeAction, which is overriden in CodeActionWithOptions to invoke GetOperations(options, cancellationToken). This avoids code action hosts to explicitly check for CodeAction's runtime type to get code action operations. (changeset 1384776)
      12fdf4dd
    • A
      C#: Do not bind constructor initializer for an “external” constructor, report... · ff62c71d
      AlekseyTs 提交于
      C#: Do not bind constructor initializer for an “external” constructor, report an error if constructor initializer is present in code. This prevents unexpected diagnostics. Fixes #386.
      ***NO_CI***
       (changeset 1384736)
      ff62c71d
    • J
      The documentation for PortableExecutableReference::CreateDocumentationProvider... · c9f7c203
      jaredpar 提交于
      The documentation for PortableExecutableReference::CreateDocumentationProvider appears to be incorrect. It suggests the method can only be called once per instance which is inconsistent with the usage in the property DocumentationProvider. Updated documentation to match the usage behavior.
       (changeset 1384654)
      c9f7c203
    • N
    • A
      Metadata: associate custom attributes with correct rows in generic parameters... · ade83e7b
      AlekseyTs 提交于
      Metadata: associate custom attributes with correct rows in generic parameters metadata table. Fixes #121. (changeset 1384436)
      ade83e7b