summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-24 19:23:27 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-24 19:23:27 +0000
commit5d68a20949723c4725b64d63472b3da2f44f5fe4 (patch)
tree51cf6b1bf8887488a8a3011f4913947807a9ceeb /clang/lib/Sema/Sema.h
parentc52f9394ce1dd59a4f57e3f6cef34fb7679e3a5a (diff)
downloadbcm5719-llvm-5d68a20949723c4725b64d63472b3da2f44f5fe4.tar.gz
bcm5719-llvm-5d68a20949723c4725b64d63472b3da2f44f5fe4.zip
Extend the implicit declaration and checking against out-of-scope
external declarations to also support external variable declarations. Unified the code for these two cases into two new subroutines. Note that we fail to diagnose cases like the one Neil pointed out, where a visible non-external declaration hides an external declaration by the same name. That will require some reshuffling of name lookup. llvm-svn: 65385
Diffstat (limited to 'clang/lib/Sema/Sema.h')
-rw-r--r--clang/lib/Sema/Sema.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h
index 60de821c476..e67c8782534 100644
--- a/clang/lib/Sema/Sema.h
+++ b/clang/lib/Sema/Sema.h
@@ -259,9 +259,10 @@ public:
QualType R, Decl* LastDeclarator,
Decl* PrevDecl, bool& InvalidDecl,
bool &Redeclaration);
+ void InjectLocallyScopedExternalDeclaration(ValueDecl *VD);
NamedDecl* ActOnVariableDeclarator(Scope* S, Declarator& D, DeclContext* DC,
QualType R, Decl* LastDeclarator,
- Decl* PrevDecl, bool& InvalidDecl,
+ NamedDecl* PrevDecl, bool& InvalidDecl,
bool &Redeclaration);
NamedDecl* ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
QualType R, Decl *LastDeclarator,
OpenPOWER on IntegriCloud