Simplify.

llvm-svn: 84307
This commit is contained in:
Daniel Dunbar 2009-10-17 03:28:56 +00:00
parent cc2f79b44b
commit 6e924a3090
1 changed files with 1 additions and 3 deletions

View File

@ -3968,9 +3968,7 @@ NamedDecl *Sema::ImplicitlyDefineFunction(SourceLocation Loc,
}
// Extension in C99. Legal in C90, but warn about it.
static const unsigned int BuiltinLen = strlen("__builtin_");
if (II.getLength() > BuiltinLen &&
std::equal(II.getName(), II.getName() + BuiltinLen, "__builtin_"))
if (II.getNameStr().startswith("__builtin_"))
Diag(Loc, diag::warn_builtin_unknown) << &II;
else if (getLangOptions().C99)
Diag(Loc, diag::ext_implicit_function_decl) << &II;