<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hey Hugo,</p>
    <p>that is weird, but the default configurations could differ.
      `modernize-use-auto` has a feature that disables the replacements
      if the type (e.g. `bool`) is shorter/same length as `auto`.<br>
      Could you please check if that for some reason interfered?</p>
    <p>Best, Jonas<br>
    </p>
    <div class="moz-cite-prefix">Am 16.01.19 um 19:13 schrieb Hugo
      lindström via cfe-dev:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHB_huS6KmbfGDv07GyyX9-cpBzJHza-ZeoEf8J8qw_p=6KumQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">Greetings! <br>
            <br>
            I'm using CMake and the <span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">CXX_CLANG_TIDY </span>property
            to enable Clang-Tidy on Linux (GCC/Clang) and Windows
            (MSVC).  
            <div><br>
            </div>
            <div>I use these lines to demo that I get different results
              on the platforms:</div>
            <div>
              <div><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">const</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre"> TU8* comp_ptr = </span><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">static_cast</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre"><</span><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">const</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre"> TU8*>(buf_ptr);</span><br>
              </div>
              <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">const</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre"> TU8* t = </span><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">NULL</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">;</span><br
                class="gmail-Apple-interchange-newline">
            </div>
            <div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">
</span></div>
            <div>Using Ninja and MSVC on Windows, Clang-Tidy modernize
              only reports</div>
            <div><br>
            </div>
            <div>
              <pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;margin-bottom:16px;margin-top:0px;background-color:rgb(246,248,250);border-radius:3px;line-height:1.45;overflow:auto;padding:16px;color:rgb(36,41,46)"><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;background:transparent;border-radius:3px;margin:0px;padding:0px;border:0px;word-break:normal;display:inline;line-height:inherit;overflow:visible">C:\Zebra\llvm-demo\build-win\..\src\aligned_buffer.cc:7:18: warning: use nullptr [modernize-use-nullptr]
  const TU8* t = NULL;
                 ^~~~~
                 nullptr</code></pre>
            </div>
            <div>Using Make and GCC on Linux, Clang-Tidy modernize
              reports</div>
            <div>
              <pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;margin-top:0px;background-color:rgb(246,248,250);border-radius:3px;line-height:1.45;overflow:auto;padding:16px;color:rgb(36,41,46);margin-bottom:0px"><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;background:transparent;border-radius:3px;margin:0px;padding:0px;border:0px;word-break:normal;display:inline;line-height:inherit;overflow:visible">/tmp/workspace/llvm-demo/src/aligned_buffer.cc:6:9: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
  const TU8* comp_ptr = static_cast<const TU8*>(buf_ptr);
        ^~~~
        auto</code></pre>
              <pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;margin-top:0px;background-color:rgb(246,248,250);border-radius:3px;line-height:1.45;overflow:auto;padding:16px;color:rgb(36,41,46);margin-bottom:0px"><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;background:transparent;border-radius:3px;margin:0px;padding:0px;border:0px;word-break:normal;display:inline;line-height:inherit;overflow:visible"><pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;margin-top:0px;border-radius:3px;line-height:1.45;overflow:auto;padding:16px;margin-bottom:0px"><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;background:transparent;border-radius:3px;margin:0px;padding:0px;border:0px;word-break:normal;display:inline;line-height:inherit;overflow:visible">/tmp/workspace/llvm-demo/src/aligned_buffer.cc:7:18: warning: use nullptr [modernize-use-nullptr]
  const TU8* t = NULL;
                 ^~~~~
                 nullptr</code></pre></code></pre>
            </div>
            <div><br>
            </div>
            <div>Both platforms have clang-tidy-6.0 and CMake 3.13</div>
            <div><br>
            </div>
            <div>Demo project: <a
                href="https://github.com/hugolm84/llvm-demo"
                moz-do-not-send="true">https://github.com/hugolm84/llvm-demo</a></div>
            <div><br>
            </div>
            <div>Is this expected, or do I do something wrong? I thought
              the clang-tidy binary would do the same checks on any
              platform it can run on?</div>
            <div>Can the compiler flags have anything to do with this? I
              use</div>
            <div><br>
            </div>
            <div>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
                0.8ex;border-left:1px solid
                rgb(204,204,204);padding-left:1ex">target_compile_options(${PROJECT_NAME}<br>
                    PRIVATE<br>
                       
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:<br>
                            $<$<CONFIG:Debug>:-O0 -Wall
                -Wextra>><br>
                        $<$<CXX_COMPILER_ID:MSVC>:<br>
                            $<$<CONFIG:Debug>:/Od /W4
                /Zi>><br>
                )</blockquote>
              <br>
              <br>
            </div>
            <div>Thanks in advance!</div>
            <div><br>
            </div>
            <div>Ps. This is my first post to the mailing list, please
              forgive me if the format is off or if this is the wrong
              forum.</div>
            <div><br>
            </div>
            <div>Best</div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
    </blockquote>
  </body>
</html>