summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-17 16:03:44 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-17 16:03:44 +0000
commit319aa6c4b5a2142da7310ed1b4ccd6e02d3f88ea (patch)
tree5807c6e5ffa7019b0cd602117b1a9a67f0cd89d5 /clang/lib/Sema
parent4ad3da2843da1e8c8da6a87548ae8ec393512c23 (diff)
downloadbcm5719-llvm-319aa6c4b5a2142da7310ed1b4ccd6e02d3f88ea.tar.gz
bcm5719-llvm-319aa6c4b5a2142da7310ed1b4ccd6e02d3f88ea.zip
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
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index f4b9cf4cdeb..d562a52694e 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -2482,16 +2482,8 @@ void Sema::DiagnoseShadow(NamedDecl* D, const LookupResult& R) {
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();
OpenPOWER on IntegriCloud