<div dir="auto"><div>Hi Andreas,</div><div dir="auto"><br><div dir="auto">Can you provide a minimal source file that exhibits the problem, and explain how you're specifying the -fconstant-string-class flag? (It should be in the compile_commands.json or compile_flags.txt file)</div><div dir="auto"><br></div><div dir="auto">It sounds like what you're describing should work, but I think we need more detail to reproduce the issue.</div><div dir="auto"><br></div><div dir="auto"> I cant really speak to the layering between objc the language and the Foundation etc libraries. I'm sympathetic to the frustration but realistically clangd won't diverge from clang here, so this would be an issue for experts on cfe-dev.</div><div dir="auto"><br></div><div dir="auto">Cheers, Sam</div><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Wed, Jul 3, 2019, 7:57 PM Andreas Ostermeyer via clangd-dev <<a href="mailto:clangd-dev@lists.llvm.org">clangd-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">clangd developers,<br>
<br>
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>
<br>
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>
<br>
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>
<br>
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>
<br>
So, what can I do (or what can you do) to get rid of - at least - this?<br>
<br>
Thanks in advance.<br>
<br>
Best regards,<br>
<br>
Andreas Ostermeyer<br>
_______________________________________________<br>
clangd-dev mailing list<br>
<a href="mailto:clangd-dev@lists.llvm.org" target="_blank" rel="noreferrer">clangd-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev" rel="noreferrer noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev</a><br>
</blockquote></div></div></div>