summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commit7a0febe66d4d75841befbb7ea7e2555fa88b9f4d (patch)
tree3de803a6c2f32897b86877a6779714b6e644fe2e /clang/lib
parentefe65e547bcddcb7de0aa2406ff69e08b1611621 (diff)
downloadbcm5719-llvm-7a0febe66d4d75841befbb7ea7e2555fa88b9f4d.tar.gz
bcm5719-llvm-7a0febe66d4d75841befbb7ea7e2555fa88b9f4d.zip
Remove the error about redefining library functions. It's causing too
much pain when compiling the Linux kernel (PR3592). llvm-svn: 64767
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index bf6a637ac26..b5e6bd69739 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud