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

Commit 015a6fc

Browse files
author
Juanjo Alvarez
committed
Added type to comments, added asm and bitfield tests
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
1 parent b5c7e21 commit 015a6fc

49 files changed

Lines changed: 3304 additions & 1676915 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

fixtures/_integration.cpp.legacy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ CPPASTTranslationUnit {
208208
. . . . . . . . . . Col: 28
209209
. . . . . . . . . }
210210
. . . . . . . . . Properties: {
211-
. . . . . . . . . . ExpressionType: org.eclipse.cdt.internal.core.dom.parser.ProblemType@4567f35d
211+
. . . . . . . . . . ExpressionType: org.eclipse.cdt.internal.core.dom.parser.ProblemType@694abbdc
212212
. . . . . . . . . . ExpressionValueCategory: PRVALUE
213213
. . . . . . . . . . IsActive: true
214214
. . . . . . . . . . IsFrozen: true
@@ -230,7 +230,7 @@ CPPASTTranslationUnit {
230230
. . . . . . . . . . . . Col: 9
231231
. . . . . . . . . . . }
232232
. . . . . . . . . . . Properties: {
233-
. . . . . . . . . . . . ExpressionType: org.eclipse.cdt.internal.core.dom.parser.ProblemType@4567f35d
233+
. . . . . . . . . . . . ExpressionType: org.eclipse.cdt.internal.core.dom.parser.ProblemType@694abbdc
234234
. . . . . . . . . . . . ExpressionValueCategory: PRVALUE
235235
. . . . . . . . . . . . IsActive: true
236236
. . . . . . . . . . . . IsFrozen: true

fixtures/_integration.cpp.native

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
LocOffsetEnd: 83,
4646
LocOffsetStart: 59,
4747
'Prop_Expression': {
48-
ExpressionType: "org.eclipse.cdt.internal.core.dom.parser.ProblemType@694abbdc",
48+
ExpressionType: "org.eclipse.cdt.internal.core.dom.parser.ProblemType@a514af7",
4949
ExpressionValueCategory: "PRVALUE",
5050
IASTClass: "CPPASTBinaryExpression",
5151
IsActive: true,
@@ -67,7 +67,7 @@
6767
kind: "string_literal",
6868
},
6969
'Prop_Operand1': {
70-
ExpressionType: "org.eclipse.cdt.internal.core.dom.parser.ProblemType@694abbdc",
70+
ExpressionType: "org.eclipse.cdt.internal.core.dom.parser.ProblemType@a514af7",
7171
ExpressionValueCategory: "PRVALUE",
7272
IASTClass: "CPPASTIdExpression",
7373
IsActive: true,

fixtures/_integration.cpp.sem.uast

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
col: 28,
119119
},
120120
},
121-
ExpressionType: "org.eclipse.cdt.internal.core.dom.parser.ProblemType@4567f35d",
121+
ExpressionType: "org.eclipse.cdt.internal.core.dom.parser.ProblemType@694abbdc",
122122
ExpressionValueCategory: "PRVALUE",
123123
IsActive: true,
124124
IsFrozen: true,
@@ -160,7 +160,7 @@
160160
col: 9,
161161
},
162162
},
163-
ExpressionType: "org.eclipse.cdt.internal.core.dom.parser.ProblemType@4567f35d",
163+
ExpressionType: "org.eclipse.cdt.internal.core.dom.parser.ProblemType@694abbdc",
164164
ExpressionValueCategory: "PRVALUE",
165165
IsActive: true,
166166
IsFrozen: true,

fixtures/_integration.cpp.uast

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
col: 28,
119119
},
120120
},
121-
ExpressionType: "org.eclipse.cdt.internal.core.dom.parser.ProblemType@694abbdc",
121+
ExpressionType: "org.eclipse.cdt.internal.core.dom.parser.ProblemType@a514af7",
122122
ExpressionValueCategory: "PRVALUE",
123123
IsActive: true,
124124
IsFrozen: true,
@@ -160,7 +160,7 @@
160160
col: 9,
161161
},
162162
},
163-
ExpressionType: "org.eclipse.cdt.internal.core.dom.parser.ProblemType@694abbdc",
163+
ExpressionType: "org.eclipse.cdt.internal.core.dom.parser.ProblemType@a514af7",
164164
ExpressionValueCategory: "PRVALUE",
165165
IsActive: true,
166166
IsFrozen: true,

fixtures/asm.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include <iostream>
2+
3+
extern "C" int func();
4+
asm(R"(
5+
.globl func
6+
.type func, @function
7+
func:
8+
.cfi_startproc
9+
movl $7, %eax
10+
ret
11+
.cfi_endproc
12+
)");
13+
14+
int main()
15+
{
16+
int n = func();
17+
// extended inline assembly
18+
asm ("leal (%0,%0,4),%0"
19+
: "=r" (n)
20+
: "0" (n));
21+
22+
// standard inline assembly
23+
asm ("movq $60, %rax\n\t"
24+
"movq $2, %rdi\n\t"
25+
"syscall");
26+
}

0 commit comments

Comments
 (0)