1. 07 1月, 2015 40 次提交
    • D
      Inline Rename in Linked Files · 4fffe945
      dpoeschl 提交于
      Inline Rename performs a rename operation on an initial solution to produce a new solution with all references renamed, conflicts resolved, etc. This new solution may contain linked documents with un-merged (and potentially conflicting) contents. This change applies this linked file merging step to present properly merged changes and rename tags.
      
      If a file on disk D.cs is linked in two Projects P1 and P2, then there are two documents D1 and D2, with their contents being equal. When a symbol is renamed, we have a new solution with documents D1' and D2'. We calculate the text changes between D1 & D1' (C1), and D2 & D2' (C2), and merge these changes C1 and C2 into a final set of changes which produces the new merged Documents, D1m and D2m, with their contents being equal. Each document D1' and D2' knows its rename information, such as the location of definitions, references, and resolved/unresolved conflicts. This information is mapped to D1m/D2m for display in the editor by tracking spans from D1' to D1m, and D2' to D2m. The final locations of these tracking spans is their location in the merged buffer contents. (changeset 1389424)
      4fffe945
    • C
      Fixed typo (changeset 1389323) · 27044db4
      ChuckStoner 提交于
      27044db4
    • M
      Cleanup analyzer driver exception handling to not mask exceptions within our compilers: · 20370313
      manishv 提交于
      (a) Remove catch(Exception) clause around ProcessEventAsync
      (b) Don't catch exceptions if analyzer is CompilerDiagnosticAnalyzer.
      
      I am also disabling an assert that is causing an interrmittent test failure to get the Debug build queue green again. Enabling this assert is tracked by bug 1098580. (changeset 1389290)
      20370313
    • N
      Interpolated strings - multiple small changes · e2306f52
      nmgafter 提交于
      (1) The alignment expression is syntactically a general expression.
      (2) The alignment must be a constant int of magnitude less than 32768
      (3) Be resilient versus malignant mscorlib
      (4) Bug fixes
       (changeset 1389224)
      e2306f52
    • P
      Fix some issues with assembly name parsing and InternalsVisibleTo calculation. · 9ee9c480
      pgavlin 提交于
      - Assembly name parsing was incorrectly handling boundary conditions involving whitespace and unclosed quotes
      - InternalsVisibleTo calculation was case-sensitive if the grantor was an assembly defined in source
      ***NO_CI***
       (changeset 1389170)
      9ee9c480
    • A
      DevDiv #1092620: Revise ISymUnmanaged* interface usage · d8ccabfe
      acasey 提交于
      1) In the Expression Compilers, reference the copies in Concord.
      2) Everywhere else, change the signatures to match the Concord versions (PreserveSig everywhere, SymbolToken for tokens).
      
      I've separately checked in an analyzer enforcing consumption of PreserveSig hresults.
      
      TODO: additional cleanup is required - see DevDiv #1098556 and DevDiv #1098557.
      
      CR: greggm (changeset 1389085)
      d8ccabfe
    • A
      Make partial expression-bodied methods act as expected and add test cases. · 7e7cfa69
      angocke 提交于
      ***NO_CI***
       (changeset 1389083)
      7e7cfa69
    • N
      Add test per code review suggestion (changeset 1389075) · 0529f662
      nmgafter 提交于
      0529f662
    • D
      Bugfix 1084179: "[Feedback] Visual Studio crash opening specific large project" · 8d65147b
      dpoeschl 提交于
      TextDocumentState.LoadTextAsync previously allowed InvalidDataExceptions to optionally propagate out. It now always catches InvalidDataExceptions and returns an empty SourceText. It also supports an option for reporting the exception as a WorkspaceFailed event. DocumentState reports the exception, while TextDocumentState does not. (changeset 1389074)
      8d65147b
    • M
      Partial fix for bug 1097381 · 07557aed
      mattwar 提交于
      This part fixes the production of syntax tree diagnostics, so that no diagnostic is ever produced with a location that is outside the tree. (changeset 1389066)
      07557aed
    • V
    • A
      VB CLSComplianceChecker: Visit declaration in each module separately to avoid... · 817593d9
      AlekseyTs 提交于
      VB CLSComplianceChecker: Visit declaration in each module separately to avoid dealing with merged namespaces. Merged namespaces do not have containing module, which was causing a NullReferenceException.
      ***NO_CI***
       (changeset 1389009)
      817593d9
    • A
      Roslyn Analyzer: ConsumePreserveSig · 1713b54a
      acasey 提交于
      For DevDiv #1092620, we introduced a number of PreserveSig COM calls.  Introduce a diagnostic that will help us catch dropped hresults.
      
      CR: srivatsn; kevinpi; pharring (changeset 1388977)
      1713b54a
    • J
    • J
      The basic change here is the following · 871a3d8d
      jaredpar 提交于
      1. Remove CancellationToken from AsyncQueue<T> constructor. This type is not an async operation, nor does it have the concept of cancellation, hence it doesn't really make sense to have a CancellationToken as parameter. Caller is now responsible for handling cancellation
      2. The SetException, Completed and Enqueue methods are inherently racy methods. Added a Try variant of all methods which returns false on failure. The non-Try variants will throw on failure.
      3. Separated out the cancellation portion of DequeueAsync. This simplified the rest of the logic in the type and allowed us to remove WaiterTaskArguments as there is no longer a race on completing the TaskCompletionSource. This is an internal implementation detail only.
      4. Added a series of unit tests to codify the behavior as I understand it after discussions with Neal.
      
      ***NO_CI***
       (changeset 1388936)
      871a3d8d
    • N
      nameof spec change - extension methods not supported · c152e330
      nmgafter 提交于
      The spec for how nameof should work in the face of extension methods is not really worked out, and the implementation is hacky and unlikely to align with an eventual rational specification. So we've decided to make it an error today so we can work out and implement some intentional rational behavior in the future without breaking backward compatibility. Nobody seems to use this particular intersection of features anyway. (changeset 1388917)
      c152e330
    • A
      Remove too aggressive assert. · 39350631
      AlekseyTs 提交于
      ***NO_CI***
       (changeset 1388887)
      39350631
    • M
      Remove CodeAction.Create overloads that take Document and Solution directly. · 9c299bb9
      mattwar 提交于
      These are being removed because they lead people to incorrectly building CodeFix providers that precompute the fix before registering the CodeAction's, as opposed to have the CodeAction itself do the work on a deferred basis.  (changeset 1388862)
      9c299bb9
    • T
      fd5df00b
    • T
      Marks CSharpKind and VBKind extension methods as Obsolete and adds equivalent... · 2c00ec7e
      TomasMatousek 提交于
      Marks CSharpKind and VBKind extension methods as Obsolete and adds equivalent extension methods Kind for both languages.
      Marks CSharpKind and VBKind instance methods on language specific syntax nodes Obsolete as well. (changeset 1388816)
      2c00ec7e
    • 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