summaryrefslogtreecommitdiffstats
path: root/coccinelle/parsing_hacks.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* coccinelle: drop a couple of FIXMEsFrantisek Sumsal2024-01-021-7/+9
| | | | | | | | | | | | | | | | | | Turns out Coccinelle can handle compound literals just fine, the parsing errors were caused by incorrectly parsed macros in code before the literals, so let's just provide simplified versions for such macros. The parsing error in `Type *foo[ELEMENTSOF(bar)] = {};` is actually harmless; it occurs only when creating an array of pointers for a type that's in an external header and it occurs only on the first parser's pass, subsequent passes resolve the type correctly. Also, unset ENABLE_DEBUG_HASHMAP, so Coccinelle doesn't expand the hashmap debug macros. As for the remaining FIXMEs, I opened a couple of issues in the Coccinelle upstream to see if they can be fixed there (or at least properly analyzed).
* coccinelle: fix typoYu Watanabe2023-12-281-1/+1
| | | | Follow-up for b25d3b36a21cd7a68039b85f887cc849ff7664a1.
* coccinelle: help Coccinelle with some more complex macrosFrantisek Sumsal2023-12-271-0/+80
Drop the original macro file, since it's not needed anymore thanks to resolving includes properly, but introduce a similar file - parsing_hacks.h - that helps Coccinelle in some specific corner cases. This eliminates most of the outstanding parsing errors in source files. The remaining ones are limitations of the parsing engine (see the FIXMEs in pasing_hacks.h) and need further investigation.