[clangd-dev] Flag constant-string-class in clangd

Alex L via clangd-dev clangd-dev at lists.llvm.org
Wed Jul 3 11:16:12 PDT 2019


Hi Andreas,

Are you getting this warning when building your code? Which compiler are
you building your code with?

Cheers,
Alex


On Wed, 3 Jul 2019 at 10:57, Andreas Ostermeyer via clangd-dev <
clangd-dev at lists.llvm.org> wrote:

> clangd developers,
>
> 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.
>
> 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 *’”.
>
> 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 *’”!
>
> 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.
>
> So, what can I do (or what can you do) to get rid of - at least - this?
>
> Thanks in advance.
>
> Best regards,
>
> Andreas Ostermeyer
> _______________________________________________
> clangd-dev mailing list
> clangd-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/clangd-dev/attachments/20190703/18bd5bfd/attachment.html>


More information about the clangd-dev mailing list