Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
7d5017d2
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7d5017d2
编写于
7月 26, 2018
作者:
M
Marcin Wachulski
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add CFG check for branch extensions.
上级
c11bdeaa
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
91 addition
and
2 deletion
+91
-2
src/Compilers/Core/Portable/CodeAnalysisResources.Designer.cs
...Compilers/Core/Portable/CodeAnalysisResources.Designer.cs
+9
-0
src/Compilers/Core/Portable/CodeAnalysisResources.resx
src/Compilers/Core/Portable/CodeAnalysisResources.resx
+3
-0
src/Compilers/Core/Portable/Operations/OperationExtensions.cs
...Compilers/Core/Portable/Operations/OperationExtensions.cs
+14
-2
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.cs.xlf
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.cs.xlf
+5
-0
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.de.xlf
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.de.xlf
+5
-0
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.es.xlf
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.es.xlf
+5
-0
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.fr.xlf
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.fr.xlf
+5
-0
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.it.xlf
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.it.xlf
+5
-0
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ja.xlf
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ja.xlf
+5
-0
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ko.xlf
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ko.xlf
+5
-0
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.pl.xlf
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.pl.xlf
+5
-0
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.pt-BR.xlf
...mpilers/Core/Portable/xlf/CodeAnalysisResources.pt-BR.xlf
+5
-0
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ru.xlf
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ru.xlf
+5
-0
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.tr.xlf
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.tr.xlf
+5
-0
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.zh-Hans.xlf
...ilers/Core/Portable/xlf/CodeAnalysisResources.zh-Hans.xlf
+5
-0
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.zh-Hant.xlf
...ilers/Core/Portable/xlf/CodeAnalysisResources.zh-Hant.xlf
+5
-0
未找到文件。
src/Compilers/Core/Portable/CodeAnalysisResources.Designer.cs
浏览文件 @
7d5017d2
...
...
@@ -1081,6 +1081,15 @@ internal class CodeAnalysisResources {
}
}
/// <summary>
/// Looks up a localized string similar to The provided operation must not be part of a Control Flow Graph..
/// </summary>
internal
static
string
OperationMustNotBeControlFlowGraphPart
{
get
{
return
ResourceManager
.
GetString
(
"OperationMustNotBeControlFlowGraphPart"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Output kind not supported..
/// </summary>
...
...
src/Compilers/Core/Portable/CodeAnalysisResources.resx
浏览文件 @
7d5017d2
...
...
@@ -630,4 +630,7 @@
<data
name=
"InvalidBranchKindForFindingCorrespondingSwitch"
xml:space=
"preserve"
>
<value>
Invalid branch kind. Finding a corresponding switch requires 'break' kind, but the current branch kind provided is '{0}'.
</value>
</data>
<data
name=
"OperationMustNotBeControlFlowGraphPart"
xml:space=
"preserve"
>
<value>
The provided operation must not be part of a Control Flow Graph.
</value>
</data>
</root>
\ No newline at end of file
src/Compilers/Core/Portable/Operations/OperationExtensions.cs
浏览文件 @
7d5017d2
...
...
@@ -330,7 +330,8 @@ internal static IOperation GetRootOperation(this IOperation operation)
/// <returns>The corresponding loop operation or <c>null</c> in case not found (e.g. no loop syntax or the branch
/// belongs to switch instead of loop operation)</returns>
/// <exception cref="ArgumentNullException"><paramref name="branchOperation"/> is null</exception>
/// <exception cref="InvalidOperationException">Invalid branch kind. Applicable kinds: <see cref="BranchKind.Break"/> and <see cref="BranchKind.Continue"/>.</exception>
/// <exception cref="InvalidOperationException">The operation is a part of Control Flow Graph or it has an invalid branch kind.
/// Applicable kinds: <see cref="BranchKind.Break"/> and <see cref="BranchKind.Continue"/>.</exception>
public
static
ILoopOperation
GetCorrespondingLoop
(
this
IBranchOperation
branchOperation
)
{
if
(
branchOperation
==
null
)
...
...
@@ -338,6 +339,11 @@ public static ILoopOperation GetCorrespondingLoop(this IBranchOperation branchOp
throw
new
ArgumentNullException
(
nameof
(
branchOperation
));
}
if
(
branchOperation
.
SemanticModel
==
null
)
{
throw
new
InvalidOperationException
(
CodeAnalysisResources
.
OperationMustNotBeControlFlowGraphPart
);
}
if
(
branchOperation
.
BranchKind
!=
BranchKind
.
Break
&&
branchOperation
.
BranchKind
!=
BranchKind
.
Continue
)
{
throw
new
InvalidOperationException
(
...
...
@@ -355,7 +361,8 @@ public static ILoopOperation GetCorrespondingLoop(this IBranchOperation branchOp
/// <returns>The corresponding switch operation or <c>null</c> in case not found (e.g. no switch syntax or the branch
/// belongs to loop instead of switch operation)</returns>
/// <exception cref="ArgumentNullException"><paramref name="branchOperation"/> is null</exception>
/// <exception cref="InvalidOperationException">Invalid branch kind. Applicable kinds: <see cref="BranchKind.Break"/>.</exception>
/// <exception cref="InvalidOperationException">The operation is a part of Control Flow Graph or it has an invalid branch kind.
/// Applicable kinds: <see cref="BranchKind.Break"/>.</exception>
public
static
ISwitchOperation
GetCorrespondingSwitch
(
this
IBranchOperation
branchOperation
)
{
if
(
branchOperation
==
null
)
...
...
@@ -363,6 +370,11 @@ public static ISwitchOperation GetCorrespondingSwitch(this IBranchOperation bran
throw
new
ArgumentNullException
(
nameof
(
branchOperation
));
}
if
(
branchOperation
.
SemanticModel
==
null
)
{
throw
new
InvalidOperationException
(
CodeAnalysisResources
.
OperationMustNotBeControlFlowGraphPart
);
}
if
(
branchOperation
.
BranchKind
!=
BranchKind
.
Break
)
{
throw
new
InvalidOperationException
(
...
...
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.cs.xlf
浏览文件 @
7d5017d2
...
...
@@ -34,6 +34,11 @@
<target
state=
"new"
>
Given operation has a null semantic model.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OperationMustNotBeControlFlowGraphPart"
>
<source>
The provided operation must not be part of a Control Flow Graph.
</source>
<target
state=
"new"
>
The provided operation must not be part of a Control Flow Graph.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OutputKindNotSupported"
>
<source>
Output kind not supported.
</source>
<target
state=
"translated"
>
Druh výstupu se nepodporuje.
</target>
...
...
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.de.xlf
浏览文件 @
7d5017d2
...
...
@@ -34,6 +34,11 @@
<target
state=
"new"
>
Given operation has a null semantic model.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OperationMustNotBeControlFlowGraphPart"
>
<source>
The provided operation must not be part of a Control Flow Graph.
</source>
<target
state=
"new"
>
The provided operation must not be part of a Control Flow Graph.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OutputKindNotSupported"
>
<source>
Output kind not supported.
</source>
<target
state=
"translated"
>
Ausgabetyp wird nicht unterstützt.
</target>
...
...
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.es.xlf
浏览文件 @
7d5017d2
...
...
@@ -34,6 +34,11 @@
<target
state=
"new"
>
Given operation has a null semantic model.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OperationMustNotBeControlFlowGraphPart"
>
<source>
The provided operation must not be part of a Control Flow Graph.
</source>
<target
state=
"new"
>
The provided operation must not be part of a Control Flow Graph.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OutputKindNotSupported"
>
<source>
Output kind not supported.
</source>
<target
state=
"translated"
>
Tipo de salida no admitida.
</target>
...
...
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.fr.xlf
浏览文件 @
7d5017d2
...
...
@@ -34,6 +34,11 @@
<target
state=
"new"
>
Given operation has a null semantic model.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OperationMustNotBeControlFlowGraphPart"
>
<source>
The provided operation must not be part of a Control Flow Graph.
</source>
<target
state=
"new"
>
The provided operation must not be part of a Control Flow Graph.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OutputKindNotSupported"
>
<source>
Output kind not supported.
</source>
<target
state=
"translated"
>
Type de sortie non pris en charge.
</target>
...
...
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.it.xlf
浏览文件 @
7d5017d2
...
...
@@ -34,6 +34,11 @@
<target
state=
"new"
>
Given operation has a null semantic model.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OperationMustNotBeControlFlowGraphPart"
>
<source>
The provided operation must not be part of a Control Flow Graph.
</source>
<target
state=
"new"
>
The provided operation must not be part of a Control Flow Graph.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OutputKindNotSupported"
>
<source>
Output kind not supported.
</source>
<target
state=
"translated"
>
Il tipo di output non è supportato.
</target>
...
...
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ja.xlf
浏览文件 @
7d5017d2
...
...
@@ -34,6 +34,11 @@
<target
state=
"new"
>
Given operation has a null semantic model.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OperationMustNotBeControlFlowGraphPart"
>
<source>
The provided operation must not be part of a Control Flow Graph.
</source>
<target
state=
"new"
>
The provided operation must not be part of a Control Flow Graph.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OutputKindNotSupported"
>
<source>
Output kind not supported.
</source>
<target
state=
"translated"
>
出力の種類がサポートされていません。
</target>
...
...
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ko.xlf
浏览文件 @
7d5017d2
...
...
@@ -34,6 +34,11 @@
<target
state=
"new"
>
Given operation has a null semantic model.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OperationMustNotBeControlFlowGraphPart"
>
<source>
The provided operation must not be part of a Control Flow Graph.
</source>
<target
state=
"new"
>
The provided operation must not be part of a Control Flow Graph.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OutputKindNotSupported"
>
<source>
Output kind not supported.
</source>
<target
state=
"translated"
>
출력 종류가 지원되지 않습니다.
</target>
...
...
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.pl.xlf
浏览文件 @
7d5017d2
...
...
@@ -34,6 +34,11 @@
<target
state=
"new"
>
Given operation has a null semantic model.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OperationMustNotBeControlFlowGraphPart"
>
<source>
The provided operation must not be part of a Control Flow Graph.
</source>
<target
state=
"new"
>
The provided operation must not be part of a Control Flow Graph.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OutputKindNotSupported"
>
<source>
Output kind not supported.
</source>
<target
state=
"translated"
>
Rodzaj wyjścia nie jest obsługiwany.
</target>
...
...
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.pt-BR.xlf
浏览文件 @
7d5017d2
...
...
@@ -34,6 +34,11 @@
<target
state=
"new"
>
Given operation has a null semantic model.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OperationMustNotBeControlFlowGraphPart"
>
<source>
The provided operation must not be part of a Control Flow Graph.
</source>
<target
state=
"new"
>
The provided operation must not be part of a Control Flow Graph.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OutputKindNotSupported"
>
<source>
Output kind not supported.
</source>
<target
state=
"translated"
>
Tipo de saída sem suporte.
</target>
...
...
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ru.xlf
浏览文件 @
7d5017d2
...
...
@@ -34,6 +34,11 @@
<target
state=
"new"
>
Given operation has a null semantic model.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OperationMustNotBeControlFlowGraphPart"
>
<source>
The provided operation must not be part of a Control Flow Graph.
</source>
<target
state=
"new"
>
The provided operation must not be part of a Control Flow Graph.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OutputKindNotSupported"
>
<source>
Output kind not supported.
</source>
<target
state=
"translated"
>
Неподдерживаемый тип выходных данных.
</target>
...
...
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.tr.xlf
浏览文件 @
7d5017d2
...
...
@@ -34,6 +34,11 @@
<target
state=
"new"
>
Given operation has a null semantic model.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OperationMustNotBeControlFlowGraphPart"
>
<source>
The provided operation must not be part of a Control Flow Graph.
</source>
<target
state=
"new"
>
The provided operation must not be part of a Control Flow Graph.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OutputKindNotSupported"
>
<source>
Output kind not supported.
</source>
<target
state=
"translated"
>
Çıkış türü desteklenmiyor.
</target>
...
...
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.zh-Hans.xlf
浏览文件 @
7d5017d2
...
...
@@ -34,6 +34,11 @@
<target
state=
"new"
>
Given operation has a null semantic model.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OperationMustNotBeControlFlowGraphPart"
>
<source>
The provided operation must not be part of a Control Flow Graph.
</source>
<target
state=
"new"
>
The provided operation must not be part of a Control Flow Graph.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OutputKindNotSupported"
>
<source>
Output kind not supported.
</source>
<target
state=
"translated"
>
输出类型不受支持。
</target>
...
...
src/Compilers/Core/Portable/xlf/CodeAnalysisResources.zh-Hant.xlf
浏览文件 @
7d5017d2
...
...
@@ -34,6 +34,11 @@
<target
state=
"new"
>
Given operation has a null semantic model.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OperationMustNotBeControlFlowGraphPart"
>
<source>
The provided operation must not be part of a Control Flow Graph.
</source>
<target
state=
"new"
>
The provided operation must not be part of a Control Flow Graph.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"OutputKindNotSupported"
>
<source>
Output kind not supported.
</source>
<target
state=
"translated"
>
輸出種類不支援。
</target>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录