llvm-project/clang/unittests
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
..
AST [ASTImporter] Check visibility/linkage of functions and variables 2019-02-14 13:07:03 +00:00
ASTMatchers [CUDA] add support for the new kernel launch API in CUDA-9.2+. 2019-01-31 21:34:03 +00:00
Analysis [clang] add tests to ExprMutAnalyzer that reproduced a crash in ASTMatchers 2019-01-21 13:26:18 +00:00
Basic [FileManager] Revert r347205 to avoid PCH file-descriptor leak. 2019-01-24 18:55:24 +00:00
CodeGen Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CrossTU Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Driver Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Format [Format/ObjC] Fix [foo bar]->baz formatting as lambda arrow 2019-02-08 15:55:18 +00:00
Frontend Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Index [clang][Index] Add a knob to index function parameters in declarations 2019-02-11 13:02:21 +00:00
Lex Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Rename Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Rewrite Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Sema [CodeComplete] Propagate preferred types through parser in more cases 2019-01-31 20:20:32 +00:00
StaticAnalyzer Accomodate gcc 7.3.0's -Wdangling-else 2019-01-31 15:26:03 +00:00
Tooling Use llvm::is_contained. NFC 2019-02-10 05:54:57 +00:00
libclang Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [Index] Add an option to collect macros from preprocesor. 2018-09-18 08:51:08 +00:00