diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-22 22:05:07 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-22 22:05:07 +0000 |
commit | bf1739c10ab875156b5fa61f9b92964ef8b68ed5 (patch) | |
tree | b3bc863cda46a0c91b8c94a078ab8eb412494b84 /lib/Serialization/ASTReaderDecl.cpp | |
parent | c3cfd2ab3338d47861ece597212f21b972ebe727 (diff) |
Make a note for an optimization that I'd like to implement, when the ASTs for local externs are sound
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | lib/Serialization/ASTReaderDecl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index cb816632bd..3819191e0c 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -131,6 +131,14 @@ namespace clang { } ~RedeclarableResult() { + // FIXME: We want to suppress this when the declaration is local to + // a function, since there's no reason to search other AST files + // for redeclarations (they can't exist). However, this is hard to + // do locally because the declaration hasn't necessarily loaded its + // declaration context yet. Also, local externs still have the function + // as their (semantic) declaration context, which is wrong and would + // break this optimize. + if (FirstID && Owning && Reader.PendingDeclChainsKnown.insert(FirstID)) Reader.PendingDeclChains.push_back(FirstID); } |