Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find a Clang warning flag in Xcode that's not present in build logs

I've got a warning I wish to suppress in Xcode, but I cannot seem to find the name of the warning. I've enabled -fdiagnostics-show-category=name and the logs show that it's a semantic issue. Looking at Clang's source, I think I've located a test for this scenario but can't seem to track down the name of it.

Currently, the build logs show this:

m:89:29: warning: assigning to 'id<AProtocol>' from incompatible type 'AViewController *' [Semantic Issue]
self.tableView.delegate = self.aController;

The ID for the warning is also 2 - but no matter what I try I cannot seem to make this go away:

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-WNO-CLUE-WHAT-THE-WARNING-FLAG-IS"
    self.tableView.delegate = self.aController;
#pragma clang diagnostic pop

Of course, I'm aware always fixing the warning is preferred, and I can do so with a protocol cast. But at this point, I've looked so hard into finding the warning, it just feels like unfinished business and I'd love to know the answer. I've also searched "freakingclangwarnings.com" and it's not present there either as far as I can tell.

like image 846
Jason Renaldo Avatar asked Jul 20 '16 17:07

Jason Renaldo


1 Answers

Searching source code, I'd guess it's warn_incompatible_qualified_id, defined in DiagnosticSemaKinds.td, which is one of those existing warnings that currently have no associated -W flag Possibly, more information in the revision log from when it was added.

like image 172
cdlane Avatar answered Nov 15 '22 10:11

cdlane