Add skeleton for a more structured way to analyzing pring format
strings than what we currently have in Sema.  This is both an
experiment and a WIP.

The idea is simple: parse the format string incrementally,
constructing a well-structure representation of each format specifier.
Each format specifier is then handed back one-by-one to a client via a
callback.  Malformed format strings are also handled with callbacks.
The idea is to separate the parsing of the format string from the
emission of diagnostics.  Currently what we have in Sema for handling
format strings is a mongrel of both that is hard to follow and
difficult to modify (I can apply this label since I'm the original
author of that code).

This is in libAnalysis as it is reasonable generic and can potentially
be used both by libSema and libChecker.

Comments welcome.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94702 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed