Pointer to const pointer and its variants would not match previously.
Add a test case for matching these types.
Signed-off-by: Jaskaran Singh
---
tests/constptr.c | 7 +++
tests/constptr.cocci | 19 +++
tests/constptr.res | 7 +++
3 files changed, 33 insertions(+)
For a pointer, the C parser constructed an AST dissimilar from that
of the Cocci AST. This caused failures in matching with certain
pointer types. For example, for the following case:
char *1 const *2 id;
The C AST constructed would be:
const Pointer1 -> Pointer2 -> char
The Cocci AST constructe
This series is to address the type matching problem in Coccinelle.
Patch 1/3 is for aligning the C and Cocci AST so that
pointer to const pointer and its variants can be matched.
Patch 2/3 reflects the pretty printing changes made in
1/3 in the ptrconstptr test case. A space is added between
the
A space is now added between the * and qualifier. Reflect this
change in the ptrconstptr test case.
Signed-off-by: Jaskaran Singh
---
tests/ptrconstptr.res | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/ptrconstptr.res b/tests/ptrconstptr.res
index f5b2210c..1d0c3c1d 1