1. 14 1月, 2015 14 次提交
  2. 09 1月, 2015 26 次提交
    • S
      Adding an analyzer to the CodeAnalysis analyzers package that issues an error... · 93209407
      srivatsn 提交于
      Adding an analyzer to the CodeAnalysis analyzers package that issues an error if someone tries to implement an interface marked with an attribute.
      
      Adding a internal type (System.Runtime.CompilerServices.InternalImplementationOnlyAttribute) to CodeAnalysis.dll and applying it to ISymbol so that we can prevent folks from implementing ISymbol (in order for us to be able to make changes to it in the future). Chose the System namespace because the LDM wants this to be a compiler feature in the future. The analyzer just checks by name and so the type can be internal and if a different dll needs it, it can define the attribute by itself. (changeset 1394725)
      93209407
    • P
      Use a compatible MethodInfo when generating MethodCallExpressions for virtual... · 769e907a
      pgavlin 提交于
      Use a compatible MethodInfo when generating MethodCallExpressions for virtual methods on value types.
      
      When generating a call to a virtual method on a value type, the least overridden method virtual method is only used in special circumstances. These circumstances are exactly the checks performed by MayUseCallForStructMethod during IL emission when deciding whether or not to call a method with a value type receiver directly). This change applies the same rules when generating MethodCallExpressions for value type receivers in expression lambdas, bringing the generated code back in line with Dev12.
      ***NO_CI***
       (changeset 1394691)
      769e907a
    • M
      Add a CodeAnalysis diagnostic for detecting memory leaks in implementation of... · 20070331
      manishv 提交于
      Add a CodeAnalysis diagnostic for detecting memory leaks in implementation of analyzers (DoNotStorePerCompilationDataOntoFields): Instance of a diagnostic analyzer might outlive the lifetime of compilation (when executed in the IDE). Hence, storing per-compilation data, such as symbols, into the fields of a diagnostic analyzer might cause stale compilations to stay alive and cause memory leaks. Instead, one should store this data on a separate type instantiatied in a compilation start action, registered using AnaylsisContext.RegisterCompilationStartActionName API. An instance of this type will be created per-compilation and it won't outlive compilation's lifetime, avoiding memory leaks.
      
      Analyzer implementation: Analyzer tracks all field declarations within analyzer types (marked with DiagnosticAnalyzerAttribute) and flags if it's variable type declaration has any type syntax descendant that binds to a type implementing ISymbol or has Compilation in its type chain.
      
      I have also added a few positive and negative tests for the diagnostic. (changeset 1394660)
      20070331
    • A
      Temporarily rollback changeset until I can fix up CI infrastructure to handle... · 244160b0
      angocke 提交于
      Temporarily rollback changeset until I can fix up CI infrastructure to handle native test DLLs. (changeset 1394561)
      244160b0
    • A
      Revert csc2/vbc2 to the old behavior of printing an error message when the... · ccc0f7d9
      angocke 提交于
      Revert csc2/vbc2 to the old behavior of printing an error message when the keepalive argument is ill formed.
      
      This change also repairs the native keep alive tests, which were not being run due to not having the right name. Similar end-to-end tests have been added in case these tests are similarly disabled in the future. (changeset 1394531)
      ccc0f7d9
    • B
      Better name generation while extracting nullables. In ConditionalAccess... · be73838f
      BalajiKris 提交于
      Better name generation while extracting nullables. In ConditionalAccess Expression ?. if we have a member binding expression, we now use that to get a smart name. If nothing else works and if the original definition is a nullable, we give back the default parameter name (v) we use in for built in types. (changeset 1394509)
      be73838f
    • A
      C#: ?. invocation in context of a statement-expression should be allowed even... · dd8f041f
      AlekseyTs 提交于
      C#: ?. invocation in context of a statement-expression should be allowed even if result type of the invocation cannot be made nullable.
      ***NO_CI***
       (changeset 1394508)
      dd8f041f
    • M
      Fix implementation of HasLeadingTrivia and HasTrailingTrivia for SyntaxNode,... · f0c4c0ac
      mattwar 提交于
      Fix implementation of HasLeadingTrivia and HasTrailingTrivia for SyntaxNode, SyntaxToken and SyntaxNodeOrToken.
      
      The previous implementation was incorrect when zero-length trivia (elastic markers) were the only trivia. (changeset 1394442)
      f0c4c0ac
    • J
    • N
      e4d141a3
    • A
      Skip intermittently failing test... · 3abbc44d
      acasey 提交于
      Skip intermittently failing test SuppressSyntaxDiagnosticsOnRaiseEventAccessorBasic (DevDiv #1103442). (changeset 1393924)
      3abbc44d
    • M
      Sealed CustomWorkspace to remove temptation to derive from it, and to... · e78a041e
      mattwar 提交于
      Sealed CustomWorkspace to remove temptation to derive from it, and to encourage deriving from Workspace directly. (changeset 1393855)
      e78a041e
    • M
      Add implementation to support workspaces that want to enable adding/removing... · 146532ec
      mattwar 提交于
      Add implementation to support workspaces that want to enable adding/removing projects and changing options duringTryApplyChanges (such as CustomWorkspace).
       (changeset 1393845)
      146532ec
    • S
      Change "Preview Changes" and "Fix All Occurrences" to be implemented as... · bdfe12d0
      shyamn 提交于
      Change "Preview Changes" and "Fix All Occurrences" to be implemented as 'flavored' actions and remove the custom support that we had implemented for invoking these actions via the light bulb preview pane. (changeset 1393815)
      bdfe12d0
    • N
      move Open\src\docs to Open\Docs (changeset 1393810) · 40ae213c
      nmgafter 提交于
      40ae213c
    • N
      1099105-Use special overload resolution rules for string.Format · 2bdc081f
      nmgafter 提交于
      We need to use specialized overload resolution rules when creating a call
      to String.Format for an interpolated string, to avoid calling a params method
      in unexpanded form. (changeset 1393796)
      2bdc081f
    • M
      Add tests for recently added CodeAnalysis meta-analyzers. · f6c9edb7
      manishv 提交于
      I also found couple of bugs in the VB implementation of the analyzers during this exercise, which have been fixed. (changeset 1393711)
      f6c9edb7
    • B
      eaad86cb
    • V
      Updating VSIXManifests to use Version=[4.5,) which is required to support the... · 0c84645c
      v_tagoo 提交于
      Updating VSIXManifests to use Version=[4.5,) which is required to support the change to NetFX 4.6. (changeset 1393698)
      0c84645c
    • M
      Fix for bug 1101013 · cd68d032
      mattwar 提交于
      Added optional filePath argument to AddDocument overloads. (changeset 1393692)
      cd68d032
    • A
      C# Null Coalesce + Conditional Access optimization – do not treat decimal zero... · 505b888f
      AlekseyTs 提交于
      C# Null Coalesce + Conditional Access optimization – do not treat decimal zero as IL constant. Fixes #470.
      ***NO_CI***
       (changeset 1393664)
      505b888f
    • T
    • C
    • M
      Added DocumentEditor -- a sub type of SyntaxEditor with document and semantic model accessible. · ee41c869
      mattwar 提交于
      Added SolutionEditor -- enables editting multiple documents.
      
      Added SyntaxEditor extensions -- add base and interface types.
      
      Added SymbolEditor extensions -- set base type for symbol & get reference to base type or interface declaration for a symbol.
      
      Changed SymbolEditor to use DocumentEditor instead of SyntaxEditor in callbacks. (changeset 1393203)
      ee41c869
    • P
      Remove all Obsolete public APIs. · 00868214
      pgavlin 提交于
      ***NO_CI***
       (changeset 1393197)
      00868214
    • T
      Currently we include a method ordinal to the name of a synthesized member... · 74142c4f
      TomasMatousek 提交于
      Currently we include a method ordinal to the name of a synthesized member produced during lowering of the method. When a method is added during EnC in the middle of existing members the ordinal is not enough to avoid name conflicts with the previously emitted synthesized members.
           In order to guarantee uniqueness of the names we now include generation ordinal in synthesized names as well, wherever we use method ordinal. Generation ordinal 0 (regular build) is omitted - the additional number is only added to names of synthesized members created during EnC compilation.
      
           An alternative would be to find the highest existing ordinal and start indexing EnC members from there. Such approach would probably work but including the generation number is much simpler and imposes less constraints on the EnC compilation.
      
           In addition to including the generic ordinal this changeset also fixes a couple of bugs that were previously masked or we haven't had coverage of the scenarios:
           - the EnC changeset calculation was not properly handling additions of synthesized members into existing synthesized classes.
           - SymbolMatcher didn't map local variable types forward correctly for variables of synthesized types.
           - SymbolMatcher didn't handle generic static lambda display classes with generic. Currently we create generic parameters for these classes via alpha renaming of the type parameters of the top-level generic method. VB is constructing fresh generic parameters, which seems a better approach. I'll leave changing this to a follow-up changeset.
      
           As a byproduct of this change we can now enable editing of methods containing dynamic operations. It just works now! Each update of such method creates a new set of dynamic sites. We don't attempt to reuse existing sites. It's little bit wasteful but it also avoids the need of invalidating the call-site caches. (changeset 1393184)
      74142c4f