[cfe-commits] r44098 - /cfe/trunk/Driver/RewriteTest.cpp

Chris Lattner clattner at apple.com
Tue Nov 13 22:25:39 PST 2007


On Nov 13, 2007, at 7:37 PM, Steve Naroff wrote:

> void RewriteTest::RewriteForwardProtocolDecl(ObjcForwardProtocolDecl  
> *PDecl) {
>   SourceLocation LocStart = PDecl->getLocation();
> +  if (LocStart.isInvalid())
> +    assert(false && "Invalid SourceLocation");
>   // FIXME: handle forward protocol that are declared across  
> multiple lines.
>   Rewrite.ReplaceText(LocStart, 0, "// ", 3);
> }
>

Not a big deal, but why not:

assert(LocStart.isValid() && "Invalid SourceLocation");

?

-Chris



More information about the cfe-commits mailing list