[PATCH] D53995: [analyzer] Drastically simplify the tblgen files used for checkers

Umann Kristóf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 9 15:26:18 PST 2018


Szelethus added a comment.

> I agree that it's aesthetically satisfying, but it is (1) inconvenient to write because that's the whole new syntax you need to memorize, i.e. all those <> and semicolons and (2) not cooperating when i want to look up checker name by source file (have to scan a few pages up to see the alias for the package and then jump multiple times to see what it expands to). So i'm still for ditching tblgen eventually :) But i definitely don't insist.

It is also a very powerful tool, and once you figure out how it works (which obviously can't be expected every time it has to be touched), it does its job wonderfully. The issue with recreating this by abusing the preprocessor is that it leads to

- Very cryptic errors messages while developing
- A **ton** of warnings if by accident it's commited with a flaw that a platform will pick up (I managed to generate 976! And that's not counting non-windows platforms)
- Arguably harder to comprehend code, that either "just works", or will be the nightmare of the ages to fix

Like many other things around here, tblgen usage is severely underdocumented, and if the greatest drawback of not understanding how it works could be fixed (via even more documentation), I believe we'd appreciate this tool a lot more. I'm more than willing to work on this a bit more, as I already chew through most of the related files in the last couple weeks.


Repository:
  rC Clang

https://reviews.llvm.org/D53995





More information about the cfe-commits mailing list