summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/IndexingContext.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-05-25 17:16:20 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-05-25 17:16:20 +0000
commit50df3a02be200a71aac0a680816f26577b46c03e (patch)
treee359b9dd1f88ba2d3a59a7515733507b998f4119 /clang/tools/libclang/IndexingContext.cpp
parent5bed56d2f543da9e5cb0174e60eed0225350a3be (diff)
downloadbcm5719-llvm-50df3a02be200a71aac0a680816f26577b46c03e.tar.gz
bcm5719-llvm-50df3a02be200a71aac0a680816f26577b46c03e.zip
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. llvm-svn: 182711
Diffstat (limited to 'clang/tools/libclang/IndexingContext.cpp')
-rw-r--r--clang/tools/libclang/IndexingContext.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp
index cb9b4925868..53561764991 100644
--- a/clang/tools/libclang/IndexingContext.cpp
+++ b/clang/tools/libclang/IndexingContext.cpp
@@ -212,6 +212,7 @@ bool IndexingContext::isFunctionLocalDecl(const Decl *D) {
if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
switch (ND->getFormalLinkage()) {
case NoLinkage:
+ case VisibleNoLinkage:
case InternalLinkage:
return true;
case UniqueExternalLinkage:
OpenPOWER on IntegriCloud