<div dir="ltr"><div dir="ltr">@JonasToth I wonder if this could this be related to <a href="https://bugs.llvm.org/show_bug.cgi?id=38471">https://bugs.llvm.org/show_bug.cgi?id=38471</a></div><div dir="ltr"><br></div><div dir="ltr">You know how bugs go, you see it once, you see it everywhere....<br><div><br></div><div>Perhaps the -checks='' has the effect here of changing the checks being used by default, Hugo what is the reason for supplying an empty -checks here?</div><div><br></div><div>Normally I'd recommend using a .clang-tidy file in the root of the project where you specify the checks you want (more specifically those you don't want, so you get new ones when added)</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:\Program Files\CMake\bin\cmake.exe" -E __run_co_compile --tidy="C:/Program Files/LLVM/bin/clang-tidy.exe;-enable-check-profile;-checks=''"</code></pre></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 17, 2019 at 8:46 PM Jonas Toth via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div 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="gmail-m_-311286827721004312moz-cite-prefix">Am 16.01.19 um 19:13 schrieb Hugo
      lindström via cfe-dev:<br>
    </div>
    <blockquote type="cite">
      
      <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-wrap">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-m_-311286827721004312gmail-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-wrap">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-wrap"> TU8* comp_ptr = </span><span class="gmail-m_-311286827721004312gmail-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-wrap">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-wrap"><</span><span class="gmail-m_-311286827721004312gmail-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-wrap">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-wrap"> TU8*>(buf_ptr);</span><br>
              </div>
              <span class="gmail-m_-311286827721004312gmail-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-wrap">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-wrap"> TU8* t = </span><span class="gmail-m_-311286827721004312gmail-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-wrap">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-wrap">;</span><br class="gmail-m_-311286827721004312gmail-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-wrap">
</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" target="_blank">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="gmail-m_-311286827721004312mimeAttachmentHeader"></fieldset>
      <pre class="gmail-m_-311286827721004312moz-quote-pre">_______________________________________________
cfe-dev mailing list
<a class="gmail-m_-311286827721004312moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>
<a class="gmail-m_-311286827721004312moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
    </blockquote>
  </div>

_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>