On Mon, Dec 15, 2014 at 11:43 AM, jahanian <[email protected]> wrote:
>
>
> On Dec 12, 2014, at 3:34 PM, Nico Weber <[email protected]> wrote:
>
> Ah, I think I found it. You indented it like this:
>
>       if (Method) {
>         if (ObjCMethodDecl *BestMethod =
>               SelectBestMethod(Sel, ArgsIn, Method->isInstanceMethod()))
>           Method = BestMethod;
>           SmallVector<ObjCMethodDecl*, 4> Methods;
>           if (!CollectMultipleMethodsInGlobalPool(Sel, Methods,
> Method->isInstanceMethod()))
>             DiagnoseUseOfDecl(Method, SelLoc);
>       }
>     }
>
> but clang-format tells you that it should be indented like so:
>
>       if (Method) {
>         if (ObjCMethodDecl *BestMethod =
>                 SelectBestMethod(Sel, ArgsIn, Method->isInstanceMethod()))
>           Method = BestMethod;
>         SmallVector<ObjCMethodDecl *, 4> Methods;
>         if (!CollectMultipleMethodsInGlobalPool(Sel, Methods,
>
> Method->isInstanceMethod()))
>           DiagnoseUseOfDecl(Method, SelLoc);
>       }
>     }
>
> That is, you added the {} to the outer if, but your indentation looks like
> you mentioned to add them to the inner if. (I should dust off and check in
> my -Windent warning.)
>
>
> My intention was as I coded. Have you looked at the warning and see if it
> is indeed calling an ‘unavailable’ method which previously went
> undiagnosed? We have uncovered
> several other cases of making such calls.
>

Let's continue the discussion on http://llvm.org/bugs/show_bug.cgi?id=21587 :-)
This does look like a false positive, and it only happens with precompiled
headers (which shouldn't change behavior, but does).
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to