[cfe-dev] clang-format and BSD KNF
Daniel Dilts
diltsman at gmail.com
Tue Jun 10 13:50:00 PDT 2014
> For example:
>
> int foo(int i);
>
> int
> foo(int i)
> {
> …
> }
>
> I’m having trouble distinguishing between function prototypes and definitions.
I doubt that it is possible to distinguish between these cases. clang-format works on a stream of tokens, not the AST. I do not believe that there is any reliable way to distinguish between function prototypes and definitions without at least a partial AST.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140610/29b29d98/attachment.html>
More information about the cfe-dev
mailing list