<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="">Hi Alex,<div class=""><br class=""></div><div class="">thanks for rapid responding.</div><div class=""><br class=""></div><div class="">No, compilers (both clang and gcc) work like expected. It’s only clangd that simply ignores the constant-string-class flag (neither in compile_commands.json nor in compile_flags.txt).</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Andreas</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 3. Jul 2019, at 20:16, Alex L <<a href="mailto:arphaman@gmail.com" class="">arphaman@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Andreas,<div class=""><br class=""></div><div class="">Are you getting this warning when building your code? Which compiler are you building your code with?</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Alex</div><div class=""><br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 3 Jul 2019 at 10:57, Andreas Ostermeyer via clangd-dev <<a href="mailto:clangd-dev@lists.llvm.org" class="">clangd-dev@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">clangd developers,<br class="">
<br class="">
currently I’m working on an own small footprint Objective-C Class library completely unrelated to Cocoa. I use clangd [version 8.0.0 (tags/RELEASE_800/final)] from homebrew as the language server in my IDE.<br class="">
<br class="">
Unfortunately I can’t clangd persuade to accept my own as a constant string class with the flag "-fconstant-string-class=NGStringLiteral". Ignoring the flag it complains: “Incompatible pointer types initializing 'NGStringLiteral *' with an expression of type 'NSString *’”.<br class="">
<br class="">
To quiet this I declared ’NSString’ as ’NGStringLiteral’ (“typedef NSString NGStringLiteral”). Now clangd warns: “Incompatible pointer types initializing 'NSString *' (aka 'NGStringLiteral *') with an expression of type 'NSString *’”!<br class="">
<br class="">
That’s annoying - like all the hard-wired Cocoa aka Apple stuff in clang software. Objective-C is an independent general purpose programming language. Not a Cocoa development tool and not an Apple software product. This should be true for clang, too.<br class="">
<br class="">
So, what can I do (or what can you do) to get rid of - at least - this?<br class="">
<br class="">
Thanks in advance.<br class="">
<br class="">
Best regards,<br class="">
<br class="">
Andreas Ostermeyer<br class="">
_______________________________________________<br class="">
clangd-dev mailing list<br class="">
<a href="mailto:clangd-dev@lists.llvm.org" target="_blank" class="">clangd-dev@lists.llvm.org</a><br class="">
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev" rel="noreferrer" target="_blank" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>