Actions
Bug #11295
open$argi does not work for source code queries
Status:
New
Priority:
High
Assignee:
-
Category:
Code querying
Start date:
01/17/2022
Due date:
% Done:
0%
Estimated time:
Detected in build:
git
Platform:
Published in build:
Description
For instance, for the following aspect:
query: call(int get_property(const char *))
{
$fprintf<"work/info.txt", "%s %s\n", "get", $arg1>;
}
and the following C source file:
int get_property(const char *);
void func(void)
{
int prop1_val;
prop1_val = get_property("prop1");
}
there is such the failure:
internal compiler error: required parameter has number "1" that exceeds the maximum one "0"
Updated by Evgeny Novikov almost 3 years ago
I thought about this. It seems that it should not work by design since it may be too hard for CIF to compute printable values for "$argi", though it may be easy in some cases, say, when passing strings or integers. Anyway, at the moment I just suggest to fix up appropriate confusing error messages.
BTW, some other special directives may not work for source code queries as well. It has sense to fix error messages for them as well.
Updated by Evgeny Novikov almost 3 years ago
- Related to Bug #11370: Refactor advice body patterns (special directives) added
Updated by Evgeny Novikov almost 3 years ago
- Related to Feature #6826: Make refactoring of advice body patterns added
Actions