[cfe-dev] Custom Clang and Xcode

Jordan Rose jordan_rose at apple.com
Mon Apr 15 09:51:41 PDT 2013

I'll start off by saying of course this is not supported. ;-) 

I have two guesses, though:
- Warnings are automatically added to the -W group; you should not put a new flag into Options.td for a new warning.
- Warnings are probably also used when uniquing PCHs, so it's possible (but not likely) that Xcode is trying to use an incompatible PCH during indexing. I doubt this is it, but if it is, turning off PCH support in the build settings might make completion come back.


On Apr 15, 2013, at 5:14 , Sebastian Hagedorn <hagi.dd at web.de> wrote:

> I'm using a (slightly) modified version of Clang to be used within Xcode. I integrate it using the "CC" flag in Xcode. All my modifications are turned off by default, but may be switched on by a set of custom flags.
> If I don't set any of these, everything is fine. However, if I enable one of my custom warnings, these warnings show up when building the project/target, but Xcode's autocompletion stops working. Could it be that Xcode is confused because it works with different versions of Clang?
> Not all of my custom flags break the autocomplete function. E.g., I have this option in Options.td:
> def export_stats : Flag<["-"], "export-stats">,
>   Flags<[CC1Option]>,
>   HelpText<"....">;
> Setting it doesn't break anything, but the following does:
> [Options.td]
> def Wunsafe_api_usage : Flag<["-"], "Wunsafe-api-usage">,
>   Group<W_Group>,
>   Flags<[CC1Option]>,
>   HelpText<"...">;
> [DiagnosticSemaKinds.td]
> def warn_unsafe_api_usage : Warning<
>   "WarningText">,
>   InGroup<DiagGroup<"unsafe-api-usage">>, DefaultIgnore;
> Did I get something wrong, or do I just have to live with it because Xcode is not prepared for this type of modification?
> Cheers
> Hagi
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130415/6b47be1c/attachment.html>

More information about the cfe-dev mailing list