Skip to content

Commit 346de8d

Browse files
chqrliebvdberg
authored andcommitted
AST: accept actual structures as type function first argument
* update QualType type functions to take the structure by value
1 parent 5466a6e commit 346de8d

File tree

4 files changed

+66
-63
lines changed

4 files changed

+66
-63
lines changed

analyser/module_analyser_function.c2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ fn void Analyser.analyseFunction(Analyser* ma, FunctionDecl* fd) {
140140
bool is_non_static = true;
141141
TypeRef* ref = params[0].getTypeRef();
142142
const Ref* param_ref = ref.getUser();
143-
if (pd.isStructType()) {
143+
if (0 && pd.isStructType()) {
144144
// Note: for struct/union it can only be a pointer to that Type.
145145
is_non_static = ref.isPointerTo(prefixType.getIndex());
146146
} else { // enum type
147-
// Note: for unum types it can be the Type or a pointer to that type
147+
// Note: for enum types it can be the Type or a pointer to that type
148148
is_non_static = ((param_ref && param_ref.decl == prefix.decl) || ref.isPointerTo(prefixType.getIndex()));
149149
}
150150

0 commit comments

Comments
 (0)