1. 07 1月, 2015 35 次提交
    • A
      Change the display name of the roslyn analyzers to "Roslyn Analyzers" to avoid... · d460e0af
      acasey 提交于
      Change the display name of the roslyn analyzers to "Roslyn Analyzers" to avoid conflicting with the "Roslyn Diagnostics" window.
      
      Bonus: move the project into the folder hierarchy.
      
      CR: srivatsn; kevinpi (changeset 1388791)
      d460e0af
    • T
      Allow PE and PDB streams to be arbitrary writable streams. If the specified... · 27a12a39
      TomasMatousek 提交于
      Allow PE and PDB streams to be arbitrary writable streams. If the specified stream doesn't fulfill implementation specific requirements of the PE/PDB writer use an intermediate in-memory stream and write its content to the user specified one at the end of emit.
      
      Fixes #349.
       (changeset 1388751)
      27a12a39
    • W
      Update VB Tests for EnC StateMachines (changeset 1388514) · da5a152e
      wochae 提交于
      da5a152e
    • J
      Add a better description for people who encounter the diagnostic about... · 4ba67ac3
      jasonmalinowski 提交于
      Add a better description for people who encounter the diagnostic about prefixed verbatim crefs. (changeset 1388376)
      4ba67ac3
    • N
      Conversions for interpolated strings v8 · bbbbe68d
      nmgafter 提交于
      We also add all of the relevant optimizations requested for current and future
      formatting performance improvements. We now use full overload resolution
      (using a new binder type specialized for synthesizing invocations) to
      select an appropriate string.Format method or format factory method, which
      enables it to handle params, generics, arbitrary argument conversions, etc, and we
      optimize the special case of no fill-ins by processing the {{ and }} escapes,
      producing a literal in the generated code. (changeset 1388224)
      bbbbe68d
    • T
      Suppress some spurious diagnostics. · 31aff41d
      tmeschter 提交于
      Within the compiler layer, we want to access properties like Category, DefaultSeverity, IsEnabledByDefault, etc., off of Diagnostic directly rather than going through Diagnostic.Descriptor. Roslyn diagnostic RS0013 enforces this.
      
      However, it fires within Diagnostic itself, even though this is the one place where accessing Descriptor is legitimate. This change adds suppressions to these occurrences, but the diagnostic should be updated to not fire in Diagnostic itself. A bug has been filed to track that work, and updating the Roslyn solutions to use new toolset & diagnostics packages with the fix.
       (changeset 1388110)
      31aff41d
    • V
      Bug fixes for index intializers. · 40898dd1
      VSadov 提交于
      Index expressions in the index initializers should be evaluated exactly once.
      In a case of a nested initializer, we were evaluating as many times as we have members in the RHS. That resulted in a number of bugs reported.
      
      Working on this fix revealed some more issues with params and named indices not being supported properly.
      
      Fixes #449
       (changeset 1388102)
      40898dd1
    • T
      Fixes a couple of issues encountered while running tests in 64bit environment: · 30b18984
      TomasMatousek 提交于
      Bug 1022828: Buffer overrun in PdbWriter - off-by-one error, we were writing to the SymWriter's stack beyond a reserved buffer.
      EnC apply tests can run 32bit.
      Resource tests were incorrectly converting a pointer to 32bit integer. (changeset 1387932)
      30b18984
    • C
      Add a test for 981208. The new cache gets collected when you call... · 80fad4b3
      chandera 提交于
      Add a test for 981208. The new cache gets collected when you call Workspace.Dispose() and remove references to the workspace and things that hold onto it, so we just need regression test. (changeset 1387925)
      80fad4b3
    • B
      Bugfix 1094427. Fix flaky Testcase. · 220e7650
      Basoundr_ms 提交于
      Call WithDocumentText when fed with the same text sometimes doesn't return the same instance of the Document because TextSource, a WeakReference, sometimes loses the reference and the perf optimization to return the same instance of the Document is not possbile. (changeset 1387876)
      220e7650
    • A
      DevDiv #1089591: Handle null in MetadataUtilities.GetScopes · 23262d1a
      acasey 提交于
      We shouldn't crash just because a PDB is missing information for a specific method.
      
      It looks like the other callers of GetMethodByVersion handle null appropriately.
      
      CR: ChuckS; KevinH (changeset 1387853)
      23262d1a
    • H
      added a test for bug 1094411 (changeset 1387824) · 30bf9e42
      heejaechang 提交于
      30bf9e42
    • V
      Trivial comment fix. (changeset 1387639) · 888a9e17
      VSadov 提交于
      888a9e17
    • V
      Updating toolset compiler. · 6353efa4
      VSadov 提交于
      ***NO_CI***
       (changeset 1387627)
      6353efa4
    • K
      Some additions to GeneratedNames in VB... · c7c9fb88
      Kevin_H 提交于
      We weren't handling a number of the different types of state machine fields, and the Kind returned for hoisted, synthesized local fields ("$S" prefix) looked wrong (returned "HoistedLocalField" instead of "HoistedSynthesizedLocalField") (changeset 1387592)
      c7c9fb88
    • V
      Added testts to verify static lambda serialization when building Debug · 02a64708
      VSadov 提交于
      ***NO_CI***
       (changeset 1387571)
      02a64708
    • J
      This changes EquatableAnalyzer to use a OfType call instead of Cast. Using... · 64c7fe25
      jaredpar 提交于
      This changes EquatableAnalyzer to use a OfType call instead of Cast.  Using Cast here is incorrect and is causing an exception to be thrown in our toolset.
      
           Bug 1097052
      ***NO_CI***
       (changeset 1387470)
      64c7fe25
    • V
      b9aac8d4
    • J
      This is a partial fix for 1097123. · 7fee7713
      jaredpar 提交于
           The most immediate issue here is cancellation of the CancellationToken passed to AsyncQueue<T> will unconditionally call TaskCompletionSource.SetResult for the main Task value in the queue.  This cancellation can happen long after or in parallel with the completion of AsyncQueue<T>.  When this happens an exception is thrown.  This exception is causing the VBCSCompiler process to crash because it expects cancelling a token to be a safe operation.
      
           Longer term there are other issues in AsyncQueue<T> that need to be fixed (several race conditions).  Once this is checked in I willmove 1097123 to a Pri 1 and track the remaining fixes with that.   (changeset 1387407)
      7fee7713
    • M
      Add SyntaxEditor class for making multiple edits to a syntax tree. · 77107b47
      mattwar 提交于
      Changed SymbolEditor to use SyntaxEditor for editting declarations. (changeset 1387404)
      77107b47
    • D
    • M
      Fix for 1095988 · 8b258b6c
      mattwar 提交于
      NameSyntaxComparer was causing stack overflow due to infinite recursion. (changeset 1387310)
      8b258b6c
    • P
      Allow range variables to be considered for Color Color. · 499cb88d
      pgavlin 提交于
      This is consistent with the spec and Dev12.
      ***NO_CI***
       (changeset 1387266)
      499cb88d
    • V
      CR feedback on toolset compiler update. · a98a2b6a
      VSadov 提交于
      ***NO_CI***
       (changeset 1387232)
      a98a2b6a
    • D
      [de minimis] IDE support for C# exception filters · 3a8b4556
      dustincampbell 提交于
      * Add 'when' keyword recommender to the completion list
      * Ensure that the completion appears inside exception filters.
      * Add 'when' keyword span to keyword highlighting for try..catch statements.
      * Ensure that parenthesis simplication works catch filter expressions
      * Add tests for 'when' classification (it already was classified correctly) (changeset 1387214)
      3a8b4556
    • A
      Diagnostic Titles for C# compiler warnings, plus some Descriptions · 806b177f
      AlexTurnMSFT 提交于
      This adds a per-rule Title for all C# and VB compiler warnings that have message strings.  These Titles will show up in the ruleset editor.
      
      This also includes Descriptions that show up upon expansion for a set of high-hit C# warnings.  I added Descriptions for high-hit warnings per MSDN.  The work is still pending to add the equivalent VB warning Descriptions.
      
      The principle was to basically restate the base Message string without its fill-ins as the Title, swapping in general words such as "method" and "type".  Often, just removing the fill-ins and quotes was enough, as the surrounding context already said what the code element was.  Sometimes the message needed to be reworded a bit.  I also left out any further clauses (such as "Consider ..."), except for shortened versions necessary to disambiguate similar warnings.  For now, I'm leaving such clauses in the messages themselves, using Description for longer-form explanations - we can see if we get feedback there.
      
      This should be the content work needed to ship the ruleset editor without blank titles.  There was one key bug remaining (now filed) where rules kept around solely to make previous /nowarns and #pragmas happy still show up in the ruleset editor.
      
      Remaining work:
      * Descriptions for VB compiler warnings
      * Titles/Descriptions for C#/VB compiler errors
      * Categories for VB/C# compiler warnings/errors (changeset 1387213)
      806b177f
    • A
      Stop throwing Unreachable exception in... · d4940b59
      AlekseyTs 提交于
      Stop throwing Unreachable exception in CalculateLocalSyntaxOffsetInSynthesizedConstructor, return -1 instead.
      ***NO_CI***
       (changeset 1387208)
      d4940b59
    • A
      C#: Disallow field-like event initializers in structs. Fixes #343. · b168a821
      AlekseyTs 提交于
      ***NO_CI***
       (changeset 1387165)
      b168a821
    • A
      DevDiv #1096605: Await in the VB EE · 1578cdf9
      acasey 提交于
      Carefully restructure AsyncRewriter.CreateMethodBinder so that it works for both the compiler and the EE.
      
      CR: chucks; ngafter; alekseyt (changeset 1387147)
      1578cdf9
    • D
      [de minimis] IDE support updates for C# string interpolation · 67cf7c1d
      dustincampbell 提交于
      * Fix up existing IDE support for C# string interpolation to account for the new syntax. The new model makes the implementation much simpler!
      * Fix formatting of alignment and format specifiers
      * Unskipped all IDE tests that were previously skipped due to the C# string interpolation changes (changeset 1387125)
      67cf7c1d
    • D
      Bugfix 1006296 - "GTD should not automatically change project context" · 1f1ca059
      dpoeschl 提交于
      Before navigating to a symbol defined in a given document, check whether a related linked or shared document is the active context document and use that document instead. For regular files (non-shared and non-linked) and closed linked files, this is always the provided document. For open linked files and open shared files, the active context is already tracked by the workspace and can be looked up directly. For closed shared files, the document in the shared project's SharedItemContextHierarchy is preferred. (changeset 1387121)
      1f1ca059
    • T
      Make sure we use the same CodeAnalysisRuleSet across all configurations of a... · a448383f
      tmeschter 提交于
      Make sure we use the same CodeAnalysisRuleSet across all configurations of a project. (changeset 1387120)
      a448383f
    • W
    • J
      Disabling a few suites which are exhibiting flaky behavior in the lab. DevDiv... · 7d3f807c
      jaredpar 提交于
      Disabling a few suites which are exhibiting flaky behavior in the lab.  DevDiv 1095079 tracks re-enabling them. (changeset 1386998)
      7d3f807c
    • V
      Updating the toolset compiler. · 1c0d0ac8
      VSadov 提交于
      ***NO_CI***
       (changeset 1386846)
      1c0d0ac8
  2. 24 12月, 2014 5 次提交
    • 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