<div dir="ltr">Cool - thanks for the context!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 21, 2020 at 5:44 AM Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</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">On Mon, Jul 20, 2020 at 5:44 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
><br>
> Should the warning be disabled for LLVM overall, rather than only for<br>
> this subproject? (& be good tohave some details in the commit at least<br>
> of why this warning is being disabled - how it is noisy/unhelpful/etc)<br>
<br>
Thank you for pointing out the lack of details in the commit message,<br>
sorry about that! I didn't think it should be disabled for LLVM<br>
overall because the issue was highly local to that particular file.<br>
Effectively, there's a #define/#include/#undef pattern in that file<br>
where some of the macro expansions would expand out to "string<br>
literal" == nullptr, which MSVC would complain about. Replacing the<br>
macro expansion with different code caused other diagnostics, so this<br>
was an expedient solution. I think if we found a second place where we<br>
need to disable the diagnostic, it might make sense to disable it<br>
globally at that point, but I wouldn't be strongly opposed to<br>
silencing it globally if someone felt strongly.<br>
<br>
~Aaron<br>
<br>
><br>
> On Sun, Jul 19, 2020 at 8:20 AM Aaron Ballman via cfe-commits<br>
> <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br>
> ><br>
> ><br>
> > Author: Aaron Ballman<br>
> > Date: 2020-07-19T11:19:48-04:00<br>
> > New Revision: 97914164f8454e745219566d58479b5762cccd51<br>
> ><br>
> > URL: <a href="https://github.com/llvm/llvm-project/commit/97914164f8454e745219566d58479b5762cccd51" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/97914164f8454e745219566d58479b5762cccd51</a><br>
> > DIFF: <a href="https://github.com/llvm/llvm-project/commit/97914164f8454e745219566d58479b5762cccd51.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/97914164f8454e745219566d58479b5762cccd51.diff</a><br>
> ><br>
> > LOG: Silence a "logical operation on address of string constant" via CMake instead.<br>
> ><br>
> > Added:<br>
> ><br>
> ><br>
> > Modified:<br>
> >     clang-tools-extra/clangd/CMakeLists.txt<br>
> ><br>
> > Removed:<br>
> ><br>
> ><br>
> ><br>
> > ################################################################################<br>
> > diff  --git a/clang-tools-extra/clangd/CMakeLists.txt b/clang-tools-extra/clangd/CMakeLists.txt<br>
> > index b3002b1d5698..8db6656e5291 100644<br>
> > --- a/clang-tools-extra/clangd/CMakeLists.txt<br>
> > +++ b/clang-tools-extra/clangd/CMakeLists.txt<br>
> > @@ -28,6 +28,10 @@ set(LLVM_LINK_COMPONENTS<br>
> >    Option<br>
> >    )<br>
> ><br>
> > +if(MSVC AND NOT CLANG_CL)<br>
> > + set_source_files_properties(CompileCommands.cpp PROPERTIES COMPILE_FLAGS -wd4130) # disables C4130: logical operation on address of string constant<br>
> > +endif()<br>
> > +<br>
> >  add_clang_library(clangDaemon<br>
> >    AST.cpp<br>
> >    ClangdLSPServer.cpp<br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > cfe-commits mailing list<br>
> > <a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
> > <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>