Remove warning about shadowing a built-in; built-ins aren't actually
considered to be a part of the translation unit unless they're named
in a way that brings them into existence.
llvm-svn: 98729
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index f4b9cf4..d562a52 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -2482,16 +2482,8 @@
DeclarationName Name = D->getDeclName();
// Return if lookup has no result.
- if (R.getResultKind() != LookupResult::Found) {
- // Emit warning for built-in shadowing.
- if (Name.getAsIdentifierInfo() &&
- Name.getAsIdentifierInfo()->getBuiltinID())
- Diag(D->getLocation(), diag::warn_decl_shadow)
- << Name
- << 4 // global builtin
- << Context.getTranslationUnitDecl();
+ if (R.getResultKind() != LookupResult::Found)
return;
- }
// Return if not variable decl.
NamedDecl* ShadowedDecl = R.getFoundDecl();