<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>> For example:<br>> <br>> int foo(int i);<br>> <br>> int<br>> foo(int i)<br>> {<br>> …<br>> }<br>> <br>> I’m having trouble distinguishing between function prototypes and definitions.<BR> <BR>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.<br><BR> </div></body>
</html>