-
Notifications
You must be signed in to change notification settings - Fork 14
Missing return types from C functions inside M3 model #69
Copy link
Copy link
Closed
Description
Setup:
- Rascal 0.34.1
- Clair 0.10.1
- Ubuntu 22.10 aarch64
- OpenJDK 17.0.7
Given a simple C program, such as:
#include <stdio.h>
int main(int argc, char argv[]){
printf("Hello world!");
return 0;
}If I try to generate an M3 model using the proper createM3ModelFromCFile function, I can see no trace of the function return type or parameters type inside the declaredType field of the M3 model. However, these are present if the program is parsed using the createM3ModelFromCppFile function.
"declaredType": [
[
"c+function:///home/matteoasuni/test.c/main(int,char.*)",
"any"
]
],"declaredType": [
[
"cpp+function:///home/matteoasuni/test.c/main(int,char.*)",
{
"returnType": {
"modifiers": [],
"baseType": "int"
},
"parameterTypes": [
{
"modifiers": [],
"baseType": "int"
},
{
"modifiers": [],
"type": {
"modifiers": [],
"baseType": "char"
}
}
]
}
]
],Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels