aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-17 16:03:01 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-17 16:03:01 +0000
commit655753a757b3eae4306cf59e84a63b78ebb2b9a7 (patch)
treea0f1e8e7447b74d7f05316cde08a7b854ef64d33 /lib/Sema/SemaDecl.cpp
parent426b863a862484e4d443c37748089f789e5f4782 (diff)
Remove the error about redefining library functions. It's causing too
much pain when compiling the Linux kernel (PR3592). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index bf6a637ac2..b5e6bd6973 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2802,12 +2802,10 @@ Sema::DeclTy *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, DeclTy *D) {
// Builtin functions cannot be defined.
if (unsigned BuiltinID = FD->getBuiltinID(Context)) {
- if (Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID)) {
- Diag(FD->getLocation(), diag::err_builtin_lib_definition) << FD;
- Diag(FD->getLocation(), diag::note_builtin_lib_def_freestanding);
- } else
+ if (!Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID)) {
Diag(FD->getLocation(), diag::err_builtin_definition) << FD;
- FD->setInvalidDecl();
+ FD->setInvalidDecl();
+ }
}
PushDeclContext(FnBodyScope, FD);