]> granicus.if.org Git - clang/commit
Fix pr18174.
authorRafael Espindola <rafael.espindola@gmail.com>
Sun, 8 Dec 2013 01:13:22 +0000 (01:13 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sun, 8 Dec 2013 01:13:22 +0000 (01:13 +0000)
commit7c2d0241bcc214ce9931d2ca51a3122872897a5b
tree9b67c676a785f7e557d4d24a6b9ebf883b492cc3
parent24ba25c65117aa52944d8589254d27a52cf0face
Fix pr18174.

Clang outputs LLVM one top level decl at a time. This combined with the
visibility computation code looking for the newest NamespaceDecl would cause
it to produce different results for nested namespaces.

The two options for producing consistent results are
* Delay codegen of anything inside a namespace until the end of the file.
* Don't look for the newest NamespaceDecl.

This patch implements the second option.
This matches the gcc behavior too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196712 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/Decl.cpp
test/CodeGenCXX/visibility.cpp