diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-02-24 01:12:38 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-02-24 01:12:38 +0000 |
commit | 8cceefac395d476114b3d4ecd7e969b2e1c9271d (patch) | |
tree | ad5d5a7d39dd408d1a5da0b7a8e4e039c8054e85 /lib/Serialization/ASTWriter.cpp | |
parent | 4970ef8e3527ac356c3e9fde0710561fcb63e424 (diff) |
[PCH] When keeping track of top-level decls for "targeted deserialization"
make sure we don't mistake ParmVarDecls for top-level decls.
Fixes rdar://10920009.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | lib/Serialization/ASTWriter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index 8dbd6e4471..66e5d6a625 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -3860,6 +3860,9 @@ void ASTWriter::associateDeclWithFile(const Decl *D, DeclID ID) { // We only keep track of the file-level declarations of each file. if (!D->getLexicalDeclContext()->isFileContext()) return; + // FIXME: We should never have ParmVarDecls with TU as context. + if (isa<ParmVarDecl>(D)) + return; SourceManager &SM = Context->getSourceManager(); SourceLocation FileLoc = SM.getFileLoc(Loc); |