Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 020303d

Browse files
author
Juanjo Alvarez
committed
Read huge.cpp since performance problems were fixed. Add missing Ranged For annotation
Signed-off-by: Juanjo Alvarez <[email protected]>
1 parent 2de4dfd commit 020303d

File tree

6 files changed

+1172281
-1
lines changed

6 files changed

+1172281
-1
lines changed

driver/fixtures/fixtures_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var Suite = &fixtures.Suite{
2020
return native.NewDriverAt(filepath.Join(projectRoot, "build/bin/native"), native.UTF8)
2121
},
2222
Transforms: normalizer.Transforms,
23-
BenchName: "dynamic_cast",
23+
BenchName: "huge",
2424
Semantic: fixtures.SemanticConfig{
2525
BlacklistTypes: []string{
2626
// TODO: list native types that should be converted to semantic UAST

driver/normalizer/annotation.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ var Annotations = []Mapping{
159159
AnnotateType("CPPASTInitializerList", nil, role.Initialization, role.List),
160160
AnnotateType("CPPASTCastExpression", nil, role.Expression, role.Incomplete),
161161
AnnotateType("CPPASTDesignatedInitializer", nil, role.Expression, role.Initialization),
162+
AnnotateType("CPPASTConditionalExpression", nil, role.Expression, role.Condition),
162163

163164
AnnotateTypeCustom("CPPASTUnaryExpression",
164165
FieldRoles{
@@ -292,6 +293,12 @@ var Annotations = []Mapping{
292293
"Prop_IterationExpression": {role.For, role.Update, role.Expression},
293294
}, role.For, role.Statement),
294295

296+
AnnotateType("CPPASTRangeBasedForStatement", ObjRoles{
297+
"Prop_Body": {role.For},
298+
"Prop_Declaration": {role.For, role.Declaration, role.Variable},
299+
"Prop_InitializerClause": {role.For, role.Iterator},
300+
}, role.For, role.Statement),
301+
295302
AnnotateType("CPPASTIfStatement", ObjRoles{
296303
"Prop_ThenClause": {role.If, role.Then},
297304
"Prop_ElseClause": {role.If, role.Else},

0 commit comments

Comments
 (0)