]> granicus.if.org Git - clang/commit
Fix linkage computation for derived types in inline functions.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 25 May 2013 17:16:20 +0000 (17:16 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 25 May 2013 17:16:20 +0000 (17:16 +0000)
commita99ecbcc4c431d52df0b01539035ab5281d54656
treed227893f1beb714e47a05479539968da1dee1ee6
parent872db39510372c4acd8851a3b956e1a135cfcd41
Fix linkage computation for derived types in inline functions.

John noticed that the fix for pr15930 (r181981) didn't handle indirect
uses of local types. For example, a pointer to local struct, or a
function that returns it.

One way to implement this would be to recursively look for local
types. This would look a lot like the linkage computation itself for
types.

To avoid code duplication and utilize the existing linkage cache, this
patch just makes the computation of "type with no linkage but
externally visible because it is from an inline function"  part of the
linkage computation itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182711 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/clang/AST/Decl.h
include/clang/AST/DeclBase.h
include/clang/AST/Type.h
include/clang/Basic/Linkage.h
include/clang/Basic/Visibility.h
lib/AST/Decl.cpp
lib/CodeGen/CGRTTI.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriterDecl.cpp
test/CodeGenCXX/linkage.cpp
test/SemaCXX/linkage2.cpp
tools/libclang/CIndex.cpp
tools/libclang/IndexingContext.cpp