- 02 10月, 2014 10 次提交
-
-
由 jaredpar 提交于
The Roslyn code base was terminating on a stack overflow in places where the native compiler would issue a simple error. This is acceptable behavior for the command line compiler but troublesome for the IDE where it was causing Visual Studio to terminate on bad code. Simply pasting certain samples caused the IDE to vanish with data loss. This change uses RuntimeHelpers.EnsureSufficientStackSpace to help guard against this problem. This function will terminate with a recoverable exception if the CLR determines insufficient stack space is available for an average .Net function to execute. At the moment this function isn't available in the PCL hence reflection is needed. Once it becomes available the reflection will be removed and the hepler will be accessed directly. (changeset 1344040)
-
由 ChuckStoner 提交于
-
由 heejaechang 提交于
removed previously added diagnostic code to pin piont race in workspace. it turns out race is not in workspace but in language services. added new diagnostic code in language services and removed one in workspace. (changeset 1343621)
-
由 TomasMatousek 提交于
-
由 nmgafter 提交于
-
由 shyamn 提交于
-
由 AlekseyTs 提交于
-
由 vladres 提交于
Test for bug 1036356: Assert fails at Microsoft.CodeAnalysis.CSharp.LocalRewriter.MakeConversion for [DefaultParameterValue(DayOfWeek.Monday)] (changeset 1343368)
-
由 VSadov 提交于
The code that was supposed to prevent that situation from happening was not handling all cases. (changeset 1343365)
-
由 vladres 提交于
Test for bug 1036339: GetDiagnostics fails with NullReferenceException for optional parameter in security attribute (changeset 1343346)
-
- 27 9月, 2014 1 次提交
-
-
由 mattwar 提交于
(changeset 1343137)
-
- 26 9月, 2014 16 次提交
-
-
由 heejaechang 提交于
removed one that doesn't take cancellationtoken to make it more explicit. (changeset 1342960)
-
由 manishv 提交于
-
由 manishv 提交于
(a) Simplify type names (name syntax) (b) Simplify member access (simple member access expression) (c) Simplify this or Me qualification (this or me expression) Fix all occurrences executed on these diagnostics will do the following respectively: (a) Simplify type names: Simplify all instances of given type name (b) Simplify member access: Simplify all instances of given member access (c) Simplify this or Me qualification: Simplify all instances of this/Me qualification Bug 1033012 ([Pending design] Add FixAllProvider API support for flavored nested actions with different interpretations) would enable different interpretations of "fix all" for these diagnostics post-preview. (changeset 1342868)
-
由 manishv 提交于
-
由 VSadov 提交于
When conditional access operator is used as a branch condition, it is often unnecessary to emit actual bool values. Example: if (arr?.Length > 0) { ... } In simple cases like above the branches can be emitted directly based on null-ness of arr, truth-ness of the access and the sense of the condition. . (changeset 1342701)
-
由 VSadov 提交于
-
由 Pharring 提交于
-
由 cyrusn 提交于
***NO_CI*** (changeset 1342538)
-
由 AlekseyTs 提交于
-
由 TomasMatousek 提交于
AssemblyMetadata and ModuleMetadata factories should not read the content of the PE file/metadata blob. Currently the factories read the headers, Assembly and Modules tables, which might result in BadImageFormatException being thrown. This exception is not turned into a compilation diagnostic because it happens before the compilation is created. A user of the Roslyn API thus needs to handle these errors in two places (as an exception and as a diagnostics). The content reading should be deferred until the AssemblyMetadata/ModuleMetadata is queried for content. This change defers metadata/PE headers reading and decoding until the AssemblyMetadata and ModuleMetadata properties/methods are called. For metadata created from files it aims to match the usage pattern of other APIs working with FileStream. The metadata factory opens the file, which might throw IO exception, but doesn't start reading the stream until the compiler asks for it, therefore it doesn't throw BadImageFormatException. The functionality is equivalent to the user opening a FileStream and creating metadata from that stream (except for a slight complication with multi-module assemblies, which are rare). Thus the API for metadata creation are consistent among in-memory byte array, stream, and file path. (changeset 1342462)
-
由 VSadov 提交于
***NO_CI*** (changeset 1342366)
-
由 srivatsn 提交于
The FxCop package adds overrides for the rules implemented and it wasn't including the existing property definition. Also noticed that nuget only adds the props file that has the same name as the package - so including the common props file with the derived props files. (changeset 1342317)
-
由 manishv 提交于
Fix for bug 1008059: Code block analyzers shouldn't be executed for symbols which have no executable code blocks Ensure we don't execute code block analyzers for symbols which have no executable code blocks. (changeset 1342235)
-
由 AlekseyTs 提交于
Initial support for loading messages from localizable resources in vbc2.exe and csc2.exe. (changeset 1342234)
-
由 VSadov 提交于
Making instance field and property initializers in structs an error. Making the instance constructors in structs not experimental. (changeset 1342196)
-
由 srivatsn 提交于
For project analyzers we return a dictionary<string, ienumerable<analyzers>> to the ruleset editor so that it can show the analyzer name corresponding to the individual rules. We don't do that for the workspace analyzers. This change fixes that. Also, I'm making the categories localizable and changing them to be simply "Design" instead of "Microsoft.Design" per the other code review i sent out. (changeset 1342176)
-
- 25 9月, 2014 13 次提交
-
-
由 heejaechang 提交于
-
由 ChuckStoner 提交于
-
由 KirillOsenkov 提交于
-
由 jmarolf 提交于
Removing the changes to the C# language inference service. Keeping them for VB. ***NO_CI*** (changeset 1341709)
-
由 vladres 提交于
Test for bug 1034455: GetDiagnostics() fails with ArgumentException for [assembly:AssemblyCulture("\0")] (changeset 1341623)
-
由 VSadov 提交于
***NO_CI*** (changeset 1341617)
-
由 vladres 提交于
Test for bug 1034429: GetDiagnostics fails with InvalidOperationException : TypedConstant is an array. Use Values property. (changeset 1341604)
-
由 VSadov 提交于
Fixes subtle potential race condition that could be allowed by the lowering of null-propagating operator. The general rule here is that compiler should not introduce reads to the same location on the heap. Doing so can introduce races to the user's code that otherwise does not have races. As a result of that it is ok to read a local variable multiple times, but only if the local cannot be modified in between reads and when it is known to not be captured into a closure. In particular at lowering stage (before lambda rewritings) without additional analysis we do not know if locals could be captured into closures and therefore shared with other threads and modified between reads. == in this change: Do not assume that reads of locals and byval parameters are idempotent if we do not know whether they may be captured in closures. Without additional analysis we can not make this assumption, so at the time of local rewrite we must conservatively consider locals and parameters as potentially returning different value every time they are evaluated. Note that nullables are excluded from this rule. That is because in the ?. operators over nullable we do not read the same location twice. We read "HasValue" and then conditionaly read ValueOrDefault. That is no different than just reading both values unconditionally - we would not introduce any new races if we do not cache the whole local between such reads. . (changeset 1341599)
-
由 chandera 提交于
***NO_CI*** (changeset 1341577)
-
由 heejaechang 提交于
theoretically this shouldn't ever happen (except TypeScript case), but perf machien caught this being happening. this adds some checking in get semantic model to find out how and when null can be set. (changeset 1341531)
-
由 manishv 提交于
User story 862192: FixAllProvider API and default fix all implementations (replace "Fix All Occurrences") Changes include: 1) Add a new abstract type, FixAllProvider, in Workspaces layer to represent a provider which can provide "fix all occurrences" code fixes corresponding to fixes provided by an ICodeFixProvider. 2) Add a new API on ICodeFixProvider (GetFixAllProvider()) to get an optional FixAllProvider. Implementers can return null to indicate no fix all support. Otherwise, they can either return an instance any of the well known implementations (see (3) below) or return an instance of their own implementation of FixAllProvider. 3) Provide default implementation of a batch FixAllProvider which works for simple code fix providers which return code actions which have a single document change action. This provider batches all the individual diagnostic fixes across the scope of fix all action, computes fixes in parallel and and then merges all the non-conflicting fixes into a single fix all code action. For more complex scenarios, users must write their own FixAllProvider implementation. 4) Add the following public types for FixAllProvider: (a) FixAllScope: Represents the scope in which fix all occurrences will be applied (document/project/solution/custom) (b) FixAllContext: Context information for computing fix all fixes. This context object is passed into FixAllProvider.GetFix API. 5) Add an optional string property "Id" on CodeAction. This string defines a unique Id amongst all code actions returned by an ICodeFixProvider, and is part of the FixAllContext to determine which code action is applied at all fix locations. 6) Enable fix all support for following code fixes: (a) Simplify type names (b) Remove unnecessary cast (c) Remove unncessary usings (d) Implement interface/abstract type 7) Fix All Occurrences UI: Currently, these FixAllOccurrences code fixes will show up as hyperlinks in code fix preview pane. Clicking on these will trigger computation of diagnostics and fix all fixes for the chosen scope. Subsequently, preview changes dialog will come up to preview the fix. Post preview, these hyperlinks will be replaced with lightbulb sub menus under the original code fix. (changeset 1341442)
-
由 heejaechang 提交于
-
由 jmarolf 提交于
***NO_CI*** (changeset 1341082)
-