[cfe-commits] r84307 - /cfe/trunk/lib/Sema/SemaDecl.cpp
Daniel Dunbar
daniel at zuster.org
Fri Oct 16 20:28:56 PDT 2009
Author: ddunbar
Date: Fri Oct 16 22:28:56 2009
New Revision: 84307
URL: http://llvm.org/viewvc/llvm-project?rev=84307&view=rev
Log:
Simplify.
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=84307&r1=84306&r2=84307&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Fri Oct 16 22:28:56 2009
@@ -3968,9 +3968,7 @@
}
// 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;
More information about the cfe-commits
mailing list