summaryrefslogtreecommitdiffstats
path: root/include/clang/Sema/Lookup.h
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2017-07-01 00:06:27 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2017-07-01 00:06:27 +0000
commit9a860738b816ad8756eb18113ff146c7f2899960 (patch)
treeb06fb085a0dbf20bf9164e7dce342fd409bfc412 /include/clang/Sema/Lookup.h
parent7fd4191f69e7fdc107617a4beb0078cd0c7cf149 (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/Sema/Lookup.h')
-rw-r--r--include/clang/Sema/Lookup.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/clang/Sema/Lookup.h b/include/clang/Sema/Lookup.h
index fc16ad2e81..ea32997d40 100644
--- a/include/clang/Sema/Lookup.h
+++ b/include/clang/Sema/Lookup.h
@@ -275,7 +275,7 @@ public:
/// declarations, such as those in modules that have not yet been imported.
bool isHiddenDeclarationVisible(NamedDecl *ND) const {
return AllowHidden ||
- (isForRedeclaration() && ND->isExternallyVisible());
+ (isForRedeclaration() && ND->hasExternalFormalLinkage());
}
/// Sets whether tag declarations should be hidden by non-tag