3 ms·
"I tried - and failed - to come up with a reasonable grep pattern" Is there a nice, light, better-than-betterthangrep[1] static analysis tool that would help w
by zwp 11y ago
"I tried - and failed - to come up with a
reasonable grep pattern"
Is there a nice, light, better-than-betterthangrep[1] static analysis tool that would help with this sort of question? (I suspect the decay to pointer would, for example, elide this detail from llvm's IR?).
[1] http://beyondgrep.com/ http://beyondgrep.com/
- klodolph 11y agoCreate a new compiler warning. My guess is that it wouldn't be that difficult to add: add a warning for using sizeof() on a value whose type is the result of array-pointer decay. If you really want the size of the pointer, then you can change the function parameter's type to the pointer type, or use a cast.
- chris_wot 11y agoClang plugins are pretty cool. The LibreOffice project uses them reasonably extensively.
- nitrogen 11y agoThere is/was a refactoring DSL for parsing and modifying C code accurately, but I don't recall the name. If I remember correctly, it was produced by a French organization or university.
- krajaratnam 11y agoYou're probably thinking of http://coccinelle.lip6.fr/sp.php http://coccinelle.lip6.fr/sp.php?
- nitrogen 11y agoYes, I think that's right.