diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2017-07-01 00:06:27 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2017-07-01 00:06:27 +0000 |
commit | 9a860738b816ad8756eb18113ff146c7f2899960 (patch) | |
tree | b06fb085a0dbf20bf9164e7dce342fd409bfc412 /include/clang/Basic | |
parent | 7fd4191f69e7fdc107617a4beb0078cd0c7cf149 (diff) |
Change enumerator default linkage type for C
Redeclaration lookup should never find hidden enumerators in C, because
they do not have linkage (C11 6.2.2/6)
The linkage of an enumerator should be VisibleNoLinkage, and
isHiddenDeclarationVisible should be checking hasExternalFormalLinkage.
This is was reviewed as part of D31778, but splitted into a different
commit for clarity.
rdar://problem/31909368
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306917 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r-- | include/clang/Basic/Visibility.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Basic/Visibility.h b/include/clang/Basic/Visibility.h index 6ac52ed6b5..cc839d789e 100644 --- a/include/clang/Basic/Visibility.h +++ b/include/clang/Basic/Visibility.h @@ -75,6 +75,9 @@ public: static LinkageInfo none() { return LinkageInfo(NoLinkage, DefaultVisibility, false); } + static LinkageInfo visible_none() { + return LinkageInfo(VisibleNoLinkage, DefaultVisibility, false); + } Linkage getLinkage() const { return (Linkage)linkage_; } Visibility getVisibility() const { return (Visibility)visibility_; } |