From 5460d2b51965a53c5db537d432988f5e1d20af6f Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sat, 17 Oct 2009 03:28:56 +0000 Subject: [PATCH] Simplify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84307 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDecl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index fd96e95afc..0ec247958c 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -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; -- 2.50.1