…
> +++ b/tests/metaattr.cocci
> @@ -0,0 +1,9 @@
> +@@
> +attribute name __attr__;
> +attribute a;
> +identifier b;
> +@@
> +
> +-int
> ++char
> + b a = 1;
I have got understanding difficulties for this test SmPL script.
I interpret such SmPL code in the way that the metavariable
…
> +++ b/tests/metaattr.c
> @@ -0,0 +1,5 @@
> +int main() {
> + int b __attr__ = 1;
> + int b = 1;
> + return 0;
> +}
* Should such test code really work with a repeated definition of
the variable “b”?
* Would you like to test here if the identifier “b” should be handled
as an
Meta attributes are added to SmPL. Add test case to match and detect a
meta attribute in C code.
Signed-off-by: Jaskaran Singh
---
tests/metaattr.c | 5 +
tests/metaattr.cocci | 9 +
tests/metaattr.res | 5 +
3 files changed, 19 insertions(+)
create mode 100644