llvm-project/clang/lib/AST
Gabor Marton 458d1457fb [ASTImporter] Check visibility/linkage of functions and variables
Summary:
During import of a global variable with external visibility the lookup
will find variables (with the same name) but with static visibility.
Clearly, we cannot put them into the same redecl chain.  The same is
true in case of functions.  In this fix we filter the lookup results and
consider only those which have the same visibility as the decl we
currently import.

We consider two decls in two anonymous namsepaces to have the same
visibility only if they are imported from the very same translation
unit.

Reviewers: a_sidorin, shafik, a.sidorin

Reviewed By: shafik

Subscribers: jdoerfert, balazske, rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D57232

llvm-svn: 354027
2019-02-14 13:07:03 +00:00
..
APValue.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ASTConsumer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ASTContext.cpp [CUDA][HIP] Use device side kernel and variable names when registering them 2019-02-14 02:00:09 +00:00
ASTDiagnostic.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ASTDumper.cpp [AST] Extract ASTNodeTraverser class from ASTDumper 2019-02-03 14:06:54 +00:00
ASTImporter.cpp [ASTImporter] Check visibility/linkage of functions and variables 2019-02-14 13:07:03 +00:00
ASTImporterLookupTable.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ASTStructuralEquivalence.cpp [AST] Fix structural inequivalence of operators 2019-02-08 08:55:32 +00:00
ASTTypeTraits.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AttrImpl.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [ASTImporter] Add importer specific lookup 2018-12-17 13:53:12 +00:00
CXXABI.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CXXInheritance.cpp [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive. 2019-02-01 20:25:04 +00:00
Comment.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CommentBriefParser.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CommentCommandTraits.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CommentLexer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CommentParser.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CommentSema.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ComparisonCategories.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DataCollection.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Decl.cpp [Builtins] Treat `bcmp` as a builtin. 2019-02-14 12:00:34 +00:00
DeclBase.cpp [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive. 2019-02-01 20:25:04 +00:00
DeclCXX.cpp Fix handling of usual deallocation functions in various configuratios. 2019-02-03 03:44:31 +00:00
DeclFriend.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DeclGroup.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DeclObjC.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DeclOpenMP.cpp Don't use ASTContext in DeclOpenMP.h because it's still incomplete. 2019-02-01 21:19:20 +00:00
DeclPrinter.cpp [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive. 2019-02-01 20:25:04 +00:00
DeclTemplate.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DeclarationName.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Expr.cpp [AST] Update the comments of the various Expr::Ignore* + Related cleanups 2019-02-03 19:50:56 +00:00
ExprCXX.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ExprClassification.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ExprConstant.cpp [Builtins] Treat `bcmp` as a builtin. 2019-02-14 12:00:34 +00:00
ExprObjC.cpp Fix "control reaches end of non-void function" warning. NFCI. 2019-01-25 11:36:51 +00:00
ExternalASTMerger.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ExternalASTSource.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatString.cpp OpenCL: Use length modifier for warning on vector printf arguments 2019-01-29 20:49:54 +00:00
FormatStringParsing.h OpenCL: Improve vector printf warnings 2018-12-01 22:16:27 +00:00
InheritViz.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ItaniumCXXABI.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ItaniumMangle.cpp [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive. 2019-02-01 20:25:04 +00:00
Linkage.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mangle.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicrosoftCXXABI.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicrosoftMangle.cpp [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive. 2019-02-01 20:25:04 +00:00
NSAPI.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
NestedNameSpecifier.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ODRHash.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
OSLog.cpp os_log: Allow specifying mask type in format string. 2018-11-06 07:05:14 +00:00
OpenMPClause.cpp [clang][OpenMP] OMPFlushClause is synthetic, no such clause exists 2019-01-28 17:04:11 +00:00
ParentMap.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PrintfFormatString.cpp OpenCL: Use length modifier for warning on vector printf arguments 2019-01-29 20:49:54 +00:00
QualTypeNames.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RawCommentList.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RecordLayout.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RecordLayoutBuilder.cpp Use llvm::is_contained. NFC 2019-02-10 05:54:57 +00:00
ScanfFormatString.cpp OpenCL: Use length modifier for warning on vector printf arguments 2019-01-29 20:49:54 +00:00
SelectorLocationsKind.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Stmt.cpp [AST] Update the comments of the various Expr::Ignore* + Related cleanups 2019-02-03 19:50:56 +00:00
StmtCXX.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StmtIterator.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StmtObjC.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StmtOpenMP.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StmtPrinter.cpp Re-commit "[AST] Introduce GenericSelectionExpr::Association" 2019-01-29 12:57:11 +00:00
StmtProfile.cpp Re-commit "[AST] Introduce GenericSelectionExpr::Association" 2019-01-29 12:57:11 +00:00
StmtViz.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TemplateBase.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TemplateName.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TextNodeDumper.cpp [modules] Fix handling of initializers for templated global variables. 2019-02-05 23:37:13 +00:00
Type.cpp Pass the base element type of an array type to the visit method instead 2019-02-08 19:46:53 +00:00
TypeLoc.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TypePrinter.cpp Rename getTypeQualifiers to getMethodQualifiers. 2019-01-28 11:37:49 +00:00
VTTBuilder.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VTableBuilder.cpp Rename getTypeQualifiers to getMethodQualifiers. 2019-01-28 11:37:49 +00:00