- 04 12月, 2014 40 次提交
-
-
由 Pilchie 提交于
Use nameof for ArgumentNullExceptions in this file while I'm here. (changeset 1379338)
-
由 manishv 提交于
Handle broken code cases by returning null instead of throwing unexpected syntax kinds. I have ensured null checks are in place at call sites. (changeset 1379297)
-
由 Pharring 提交于
Introduce IWorkspaceCacheService which will be used to flush caches when the host determines that it needs to free memory. (changeset 1379254)
-
由 VSadov 提交于
Changing order causes unnecessary noise in metadata diffing tools. Also we have seen some evidence of existing code taking unintentional dependency on the order of constructors as returned via reflection. That is arguably a bug since the order is not specified nor guaranteed. On the other hand we do not have any serious reasons for moving that cheese, so we will try keeping the emit order of synthetic ctors as it was. Dev12 C# compiler appears to emit synthetic constructors after all other methods - first ctor, and then cctor, if needed. (changeset 1379237)
-
由 tmeschter 提交于
Disable unit test Return07_2 in Roslyn.Compilers.Csharp.Emit.UnitTests because it is flaky. (changeset 1379207)
-
由 nmgafter 提交于
The existing code to handle cycles while binding base classes is exposed to new situations due to the presence of static import in the language. We extend the mechanism to cut short cycles in those cases as well. (changeset 1379204)
-
由 ChuckStoner 提交于
-
由 AlekseyTs 提交于
-
由 pgavlin 提交于
The original code simply walked the binder chain until one of InCatchBlock or InFinallyBlock was dropped from the binder flags. Unfortunately, this algorithm cannot handle multiply nested catch/finally blocks and would incorrectly issue CS0724 for patterns similar to the code given below: try { } catch { try { } finally { try { } catch { throw; } } } The new code binder flag that is set for finally clauses nested inside try clauses and reset at catch clauses to detect this sort of nesting. ***NO_CI*** (changeset 1378936)
-
由 pgavlin 提交于
Certain field accesses must always be values rather than variables in order to properly implement uses of fields of readonly variables (e.g. foreach iteration variables). This change adds a field to track whether or not a given field access must always be a value and adjusts code generation appropriately: taking the address of such an access instead takes the address of a temporary copy of the field's value. This is necessary in particular for method calls on by-value accesses. ***NO_CI*** (changeset 1378889)
-
由 angocke 提交于
The generated names mapping didn't contain an entry for the synthesized local generated for the value of a Select Case statement. This change adds the mapping. ***NO_CI*** (changeset 1378860)
-
由 Pharring 提交于
Fixes a stack overflow in AbstractSyntaxNavigator.GetPreviousToken. I couldn't actually repro the SO described in the bug, but it's simple enough to fix the tail recursion. (changeset 1378788)
-
由 jaredpar 提交于
Was looking around the native code base today and noticed a lot of tabs it the file. This is inconsistent with the rest of the code base which uses spaces (and the C++ code base itself which is predominantly space delimited). Wrote a script to detect all the occurrences of tabs and switched them to be spaces. (changeset 1378785)
-
由 Pharring 提交于
I looked at a perf trace from formatting a large enum (actually a metadata as source perf issue) and noticed some small perf tweaks. Introduce the "ContainsLineBreak" extension method and use it, where possible, as a replacement for "s.GetNumberOfLineBreaks() > 0" (changeset 1378772)
-
由 jasonmalinowski 提交于
We had a number of projects that included the StyleCop NuGet package only to also disable StyleCop. We also had some projects that were referencing assemblies out of packages but didn't say so in packages.config, or had stuff in packages.config not reflected in the actual project file. (changeset 1378738)
-
由 TomasMatousek 提交于
-
由 mattwar 提交于
(changeset 1378686)
-
由 heejaechang 提交于
-
由 mattwar 提交于
Fixed lexer to correctly compute error offsets to match the model of having syntax errors encode offsets from start of leading trivia. (changeset 1378591)
-
由 srivatsn 提交于
When we crack open an analyzer dll and instantiate analyzers, we can produce some warnings in faulty cases. These were being produced way to early and weren't being passed through regular filtering code. Such support didnt exist because we were only producing errors during this stage. We don't want these warnings to be errors. Adding some code to call into the CSharp\VBDiagnosticFilter type which has all the filtering logic based on options. There were already a bunch of unit tests for this scenario - all recording the errant behavior. fixing them all up now. (changeset 1378577)
-
由 manishv 提交于
Fix for bug 1087195: Add overloads to RegisterSymbolAction and RegisterSyntaxNodeAction that take ImmutableArray for symbol/syntax kinds (changeset 1378545)
-
由 manishv 提交于
Fix for bug 1086767: Title and Descriptor fields in DiagnosticDescriptor cannot take arguments if they want to be localized Add params array parameter for format arguments to LocalizableResourceString constructor. (changeset 1378542)
-
由 srivatsn 提交于
When we crack open an analyzer dll and try to instantiate the analyzers, we report warnings if we cannot instantiate them. If we are unable to instantitate any analyzer in that assembly, we report that there are no analyzers as well which is silly. Fixing it by tracking when we report an error and not issuing the noanalyzers warning in that case. (changeset 1378514)
-
由 jaredpar 提交于
This change allows conditional member access as a member declarator of an anonymous object expression. It is now legal to do the following: class C { int L { get { return 0; } } void Test() { C local = null; var x1 = new { local.L }; var x2 = new { local?.L } ; } } The initializer of x1 and x2 will produce a single anonymous type definition. It will have a single field named L. This closes DevDiv 991505 and CodePlex 199 ***NO_CI*** (changeset 1378486)
-
由 ChuckStoner 提交于
-
由 AlekseyTs 提交于
IsDefinedOrImplementedInSourceTree – when called for an implicitly declared instance constructor, return the answer for the containing type. This ensures that an error about missing parameter-less base constructor is returned for syntax tree containing declaration of a derived type. (changeset 1378066)
-
由 AlekseyTs 提交于
-
由 AlekseyTs 提交于
CommandLineParser.GetCompilationAndModuleNames should report an error rather than infer an empty compilation name, which would cause an exception during compilation creation. (changeset 1378023)
-
由 manishv 提交于
Fix binary compat break by bringing back the DiagnosticDescriptor constructor that takes string parameters instread of LocalizableStrings. (changeset 1377929)
-
由 acasey 提交于
Thanks to Tomas' suggestion that we use IntPtr in place of reference types and Vlad's excellent code generator, this feature basically only requires the suppression of a couple diagnostics. There is, however, a small change (improvement?) from dev12. Suppose "str" is a string. Then dev12 types "&str" as "string&*", which is probably the most accurate .NET description of the type. However, Roslyn does not support & types, so it uses the representation "IntPtr*". The value of the pointer is the same, and dereferencing yields the same pointer, albeit as an IntPtr, rather than as a string&. This might actually be an improvement, since it is clear what operations can be performed on an IntPtr, whereas a string& can only be manipulated through trial and error (e.g. it turns out that it supports ==). I think it would be reasonable to add a VS integration test for this scenario, but I don't know of a good way to extract the pointer value so that it can be re-used with the @ syntax, which can actually be verified. Also, our base drop of VS can't launch the Memory window, which it would also be nice to verify. CR: VSadov; ChuckS (changeset 1377887)
-
由 pgavlin 提交于
***NO_CI*** (changeset 1377865)
-
由 mattwar 提交于
1079042 - NormalizeWhitespace problem aligning xml doc comments 86616, 1040241 - NormalizeWhitespace problem losing whitespace after directive keywords 1070667 - SyntaxNode.GetCurrentNode throwing when not found 991474 - SyntaxRewriter throws instead of removing trivia when trivia override returns null. (changeset 1377858)
-
由 manishv 提交于
1) Implement diagnostic analyzers which register syntax tree action (syntax diagnostics), semantic model action (semantic diagnostics) and compilation end action (declaration diagnostics with non-source location) 2) Add C# and VB code analysis assemblies as analyzer assets to VisualStudioComponents VSIX manifest file. 3) Remove special casing of CompilerDiagnosticsProvider in the IDE diagnostic service, its just a regular VSIX based analyzer now. 4) Add WellKnownDiagnosticTags.NotConfigurable tag to all compiler errors and ensure that we don't suppress/filter diagnostics or analyzers with this tag. (changeset 1377682)
-
由 jasonmalinowski 提交于
-
由 heejaechang 提交于
changed namespace for FatalError to Microsoft.CodeAnalysis for compiler and Microsoft.CodeAnalysis.ErrorReporting for the rest. it is done so that we can access static fields in FatalErrors. otherwise, it is not possible to see those under debugger in a dump. also removed FatalError.Report [DebuggerHidden] attribute so that we can set break point there. (changeset 1377507)
-
由 srivatsn 提交于
Fixing 1087736: [FxCop] Error CA3060 (UseXmlReaderForSchemaRead) being reported in RulesetProcessor.cs Calling XmlSchema.Read(Stream, ..) is potentially unsafe it seems. The rule suggests changing it to XmlSchema.Read(XmlReader, ...). Doing that. (changeset 1377280)
-
由 dustincampbell 提交于
* NameOf included in completion list * Signature help for NameOf * Completion list support inside NameOf expressions for relevant symbols, Me, MyBase and MyClass * Formatter no longer inserts a space between NameOf and the opening parenthesis * Pretty listing no longer inserts empty argument lists in NameOf * Plenty 'o tests * Parenthesis simplification support (changeset 1377255)
-
由 ChuckStoner 提交于
-
由 mattwar 提交于
-
由 srivatsn 提交于
-