diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-11-13 05:14:45 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-11-13 05:14:45 +0000 |
| commit | 6e132bef6fd1625bd214b49a198b78ca1c4d5a4d (patch) | |
| tree | e0e72ae43078923fc71a2fdf8847bf5c5d8a94e9 /clang/test/Modules/submodule-visibility.cpp | |
| parent | 978cbc54bc17082d3d2f42e92e7ed554037588b6 (diff) | |
| download | bcm5719-llvm-6e132bef6fd1625bd214b49a198b78ca1c4d5a4d.tar.gz bcm5719-llvm-6e132bef6fd1625bd214b49a198b78ca1c4d5a4d.zip | |
[modules] When a declaration has non-trivial visibility, check whether it's
actually hidden before we check its linkage. This avoids computing the linkage
"too early" for an anonymous struct with a typedef name for linkage.
llvm-svn: 253012
Diffstat (limited to 'clang/test/Modules/submodule-visibility.cpp')
| -rw-r--r-- | clang/test/Modules/submodule-visibility.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Modules/submodule-visibility.cpp b/clang/test/Modules/submodule-visibility.cpp index b2c5fc7ba19..345ae155bb3 100644 --- a/clang/test/Modules/submodule-visibility.cpp +++ b/clang/test/Modules/submodule-visibility.cpp @@ -28,3 +28,10 @@ int k = n + m; // OK, a and b are visible here. #ifndef B #error B is not defined #endif + +// Ensure we don't compute the linkage of this struct before we find it has a +// typedef name for linkage purposes. +typedef struct { + int p; + void (*f)(int p); +} name_for_linkage; |

