<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">Hi Eric,</span>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br class="">
</div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">I believe there will be in the Driver, as that will be sharing some of clang’s driver code. Perhaps someone else can give a better answer on this than me though?</div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br class="">
</div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">David</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 11 Feb 2020, at 18:55, Eric Schweitz (PGI) <<a href="mailto:eric.schweitz@pgroup.com" class="">eric.schweitz@pgroup.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Are there cases where flang and clang headers are both used in the same module?<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div class="">
<div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0in 0in;" class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class="">From:</b><span class="Apple-converted-space"> </span>flang-dev <<a href="mailto:flang-dev-bounces@lists.llvm.org" class="">flang-dev-bounces@lists.llvm.org</a>><span class="Apple-converted-space"> </span><b class="">On Behalf Of<span class="Apple-converted-space"> </span></b>David
Truby via flang-dev<br class="">
<b class="">Sent:</b><span class="Apple-converted-space"> </span>Tuesday, February 11, 2020 9:22 AM<br class="">
<b class="">To:</b><span class="Apple-converted-space"> </span>Doerfert, Johannes <<a href="mailto:jdoerfert@anl.gov" class="">jdoerfert@anl.gov</a>>;
<a href="mailto:flang-dev@lists.llvm.org" class="">flang-dev@lists.llvm.org</a><br class="">
<b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [flang-dev] Code formatting alignment with LLVM<o:p class=""></o:p></div>
</div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class="">Hi Johannes,<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class="">The header exception we are referring to is the IncludeCategories: section in the clang-format file. The default LLVM style has (llvm|llvm-c|clang|clang-c) as prefixes for headers to ensure those headers appear first
when includes are sorted. This follows the Coding Style which says that LLVM sub-project includes should be sorted from most specific to least specific.<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class="">As a small example: if we don't add this specific excpetion and I write<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class="">#include <flang/parser/parse-tree.h><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class="">#include <clang/Driver/Driver.h><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class="">this will be re-sorted to<o:p class=""></o:p></span></div>
</div>
<div class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class="">#include <clang/Driver/Driver.h><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class="">#include <flang/parser/parse-tree.h><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class="">as clang is higher in the priority order than flang without an additional exception.<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class="">Given that the order should be different for each sub-project (as their own headers should be first) I think this one addition to the clang-format file does make sense, rather than having it in the global style.<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class="">I hope that explanation helps!<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class="">Thanks<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class="">David Truby<o:p class=""></o:p></span></div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div>
</div>
<div class="MsoNormal" align="center" style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;">
<hr size="2" width="98%" align="center" class="">
</div>
<div id="divRplyFwdMsg" class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class=""><span style="" class="">From:</span></b><span style="" class=""><span class="Apple-converted-space"> </span>Doerfert, Johannes <<a href="mailto:jdoerfert@anl.gov" style="color: purple; text-decoration: underline;" class="">jdoerfert@anl.gov</a>><br class="">
<b class="">Sent:</b><span class="Apple-converted-space"> </span>11 February 2020 14:05<br class="">
<b class="">To:</b><span class="Apple-converted-space"> </span><a href="mailto:flang-dev@lists.llvm.org" style="color: purple; text-decoration: underline;" class="">flang-dev@lists.llvm.org</a><span class="Apple-converted-space"> </span><<a href="mailto:flang-dev@lists.llvm.org" style="color: purple; text-decoration: underline;" class="">flang-dev@lists.llvm.org</a>>;
David Truby <<a href="mailto:David.Truby@arm.com" style="color: purple; text-decoration: underline;" class="">David.Truby@arm.com</a>><br class="">
<b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: Code formatting alignment with LLVM</span><o:p class=""></o:p></div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""></o:p></div>
</div>
</div>
<div class="">
<div class="">
<p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;">
<span style="font-family: Arial, sans-serif;" class="">I'm always in favor of minimizing the differences. It helps getting "accepted" by the community but also me personally. I'm used to llvm settings, anything that differs looks weird and will make my workflow
uneasy. I think a lot is just conditioning, when I read diffs, for example, the color highlighting is usually good enough to show the non-alignment change even if things moved a bit. I don't notice that as a problem by now, which is not to say I don't understand
the arguments made for the current f18 settings.<o:p class=""></o:p></span></p>
</div>
<div class="">
<p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;">
<span style="font-family: Arial, sans-serif;" class="">Btw. I failed to find the clang format "clang header exception" mentioned in the call yesterday. Can someone show me a minimal example to show the effect? I mean, what does clang do differently for which
we need an extra option? It sounds like something that needs fixing and we might be able to sign with llvm without changing the current options.<o:p class=""></o:p></span></p>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">Cheers,<o:p class=""></o:p></span></div>
</div>
<div class="">
<p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;">
<span style="font-family: Arial, sans-serif;" class=""> Johannes<br class="">
<br class="">
<o:p class=""></o:p></span></p>
</div>
<div class="">
<p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;">
<span style="font-family: Arial, sans-serif;" class="">P.s. I strongly advice to have discussions on the list or on phabricator, whichever is applicable. We already know various ppl do not monitor/interact with GH.<o:p class=""></o:p></span></p>
</div>
<div class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">--<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">written from my phone<o:p class=""></o:p></span></div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
</div>
<div class="MsoNormal" align="center" style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;">
<hr size="2" width="98%" align="center" class="">
</div>
<div id="x_divRplyFwdMsg" class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class=""><span style="" class="">From:</span></b><span style="" class=""><span class="Apple-converted-space"> </span>flang-dev <<a href="mailto:flang-dev-bounces@lists.llvm.org" style="color: purple; text-decoration: underline;" class="">flang-dev-bounces@lists.llvm.org</a>>
on behalf of David Truby via flang-dev <<a href="mailto:flang-dev@lists.llvm.org" style="color: purple; text-decoration: underline;" class="">flang-dev@lists.llvm.org</a>><br class="">
<b class="">Sent:</b><span class="Apple-converted-space"> </span>Tuesday, February 11, 2020 4:20:57 AM<br class="">
<b class="">To:</b><span class="Apple-converted-space"> </span><a href="mailto:flang-dev@lists.llvm.org" style="color: purple; text-decoration: underline;" class="">flang-dev@lists.llvm.org</a><span class="Apple-converted-space"> </span><<a href="mailto:flang-dev@lists.llvm.org" style="color: purple; text-decoration: underline;" class="">flang-dev@lists.llvm.org</a>><br class="">
<b class="">Subject:</b><span class="Apple-converted-space"> </span>[flang-dev] Code formatting alignment with LLVM</span><o:p class=""></o:p></div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""></o:p></div>
</div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Hi all,<span class="Apple-converted-space"> </span><o:p class=""></o:p></div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
We have been having a discussion on the GitHub issue tracker about code formatting (and specifically clang-format settings) and whether to align closer with the rest of the project, which you can find here:<span class="Apple-converted-space"> </span><a href="https://github.com/flang-compiler/f18/pull/945" style="color: purple; text-decoration: underline;" class="">https://github.com/flang-compiler/f18/pull/945</a>.
Since the discussion there hasn’t moved much recently I’d like to start a discussion here so we can get input from a wider group of people. <o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
My opinion is that regardless of technical preferences we shouldn’t diverge from the style of the rest of the project as much as we currently do, or at least if we want to do that then we should have a discussion with the wider community about whether that
is acceptable to them.<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Does anyone else have any input on this?<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Thanks<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
David Truby<o:p class=""></o:p></div>
</div>
</div>
</div>
<div class="">
<div class="MsoNormal" align="center" style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;">
<hr size="2" width="100%" align="center" class="">
</div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply
email and destroy all copies of the original message.<span class="Apple-converted-space"> </span></div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>