On 2014-01-06, at 11:25, Gregory Szorc <g...@mozilla.com> wrote: > Clang provides access to the low-level token stream [1]. This is available > via libclang (the C API) and the Python bindings and I'm pretty sure you can > access this info from plugins. > > Each token is associated with a source location (file, line, column, etc). > So, you can tell it which files are allowed to contain certain tokens and not > fail the build if something like NULL is in 3rd party or system headers. > > You should also be able to scan the token stream to look for things like > missing braces on if blocks. Lots of possibilities.
Both are probably good clang-analyser plugins to write. http://clang-analyzer.llvm.org/ _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform