[cfe-commits] r46897 - in /cfe/trunk: Driver/TextDiagnosticPrinter.cpp Driver/TextDiagnosticPrinter.h Sema/Sema.h Sema/SemaDeclObjC.cpp include/clang/Basic/DiagnosticKinds.def test/Sema/method-undef-category-warn-1.m test/Sema/method-undefined-warn-1.m test/Sema/undef-protocol-methods-1.m

Chris Lattner clattner at apple.com
Sun Feb 10 13:26:17 PST 2008


On Feb 8, 2008, at 2:06 PM, Steve Naroff wrote:
> A bunch-o changes to fix <rdar://problem/5716046> incomplete  
> implementation of ObjC class warning is incomplete
> +void Sema::CheckProtocolMethodDefs(SourceLocation ImpLoc,
> +                                   ObjCProtocolDecl *PDecl,
...
>
>         method->getImplementationControl() !=  
> ObjCMethodDecl::Optional) {
> +      if (!IncompleteImpl) {
> +        Diag(ImpLoc, diag::warn_incomplete_impl);
> +        IncompleteImpl = true;
> +      }

This (and other instances) could be simplified to:
if (!IncompleteImpl)  // Emit the incomplete impl warning only once.
   IncompleteImpl = Diag(ImpLoc, diag::warn_incomplete_impl);

-Chris



More information about the cfe-commits mailing list