llvm-project/clang/lib/AST
Richard Smith 97135cc94a [modules] Simplify and generalize the existing rule for finding hidden
declarations in redeclaration lookup. A declaration is now visible to
lookup if:

 * It is visible (not in a module, or in an imported module), or
 * We're doing redeclaration lookup and it's externally-visible, or
 * We're doing typo correction and looking for unimported decls.

We now support multiple modules having different internal-linkage or no-linkage
definitions of the same name for all entities, not just for functions,
variables, and some typedefs. As previously, if multiple such entities are
visible, any attempt to use them will result in an ambiguity error.

This patch fixes the linkage calculation for a number of entities where we
previously didn't need to get it right (using-declarations, namespace aliases,
and so on).  It also classifies enumerators as always having no linkage, which
is a slight deviation from the C++ standard's definition, but not an observable
change outside modules (this change is being discussed on the -core reflector
currently).

This also removes the prior special case for tag lookup, which made some cases
of this work, but also led to bizarre, bogus "must use 'struct' to refer to type
'Foo' in this scope" diagnostics in C++.

llvm-svn: 252960
2015-11-12 22:19:45 +00:00
..
APValue.cpp Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 06:28:36 +00:00
ASTConsumer.cpp Introduce a PCHContainerOperations interface (NFC). 2015-06-20 18:53:08 +00:00
ASTContext.cpp Add support for GCC's '__auto_type' extension, per the GCC manual: 2015-11-11 02:02:15 +00:00
ASTDiagnostic.cpp Support __builtin_ms_va_list. 2015-09-17 20:55:33 +00:00
ASTDumper.cpp [Sema] Implement __make_integer_seq 2015-11-04 03:40:30 +00:00
ASTImporter.cpp Add support for GCC's '__auto_type' extension, per the GCC manual: 2015-11-11 02:02:15 +00:00
ASTTypeTraits.cpp Fix bug in DynTypedMatcher::constructVariadic() that would cause false negatives. 2014-10-06 13:14:30 +00:00
AttrImpl.cpp Devirtualize Attr and all subclasses. 2015-03-19 16:06:49 +00:00
CMakeLists.txt Move functions declared in Stmt{ObjC,CXX}.h and OpenMPClause.h into 2015-10-02 13:41:04 +00:00
CXXABI.h [MS ABI] Correctly mangle classes without names for linkage purposes 2015-08-31 18:48:39 +00:00
CXXInheritance.cpp unique_ptrify CXXBasePaths::DeclsFound & remove the then-unnecessary user-defined dtor 2015-08-18 23:56:00 +00:00
Comment.cpp Use llvm::makeArrayRef instead of explicitly calling ArrayRef constructor and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>. 2014-08-30 16:55:39 +00:00
CommentBriefParser.cpp
CommentCommandTraits.cpp Fix for PR21254 - Assertion in comment parser 2014-10-15 16:18:20 +00:00
CommentLexer.cpp Comment parsing: fix an assertion failure on a verbatim block terminated with "**/" 2015-04-15 23:45:43 +00:00
CommentParser.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
CommentSema.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
Decl.cpp [modules] Simplify and generalize the existing rule for finding hidden 2015-11-12 22:19:45 +00:00
DeclBase.cpp [Sema] Implement __make_integer_seq 2015-11-04 03:40:30 +00:00
DeclCXX.cpp [AST] Turn the callbacks of lookupInBases and forallBases into a function_ref 2015-07-25 15:07:25 +00:00
DeclFriend.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
DeclGroup.cpp Replace custom alignment enforcement with LLVM_ALIGNAS. 2015-04-02 12:25:07 +00:00
DeclObjC.cpp Stop back-patching 'readonly' Objective-C properties with 'readwrite' ones. 2015-11-03 01:15:46 +00:00
DeclOpenMP.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
DeclPrinter.cpp [ATTR] Automatic line feed after pragma-like attribute. 2015-10-12 06:59:48 +00:00
DeclTemplate.cpp [Sema] Implement __make_integer_seq 2015-11-04 03:40:30 +00:00
DeclarationName.cpp When pretty-printing a C++11 literal operator, don't insert whitespace between 2015-10-08 00:17:59 +00:00
Expr.cpp [coroutines] Creation of promise object, lookup of operator co_await, building 2015-10-27 06:02:45 +00:00
ExprCXX.cpp Fix FunctionParmPackExpr::Create() to take a ParmVarDecl* array. 2015-09-30 14:04:23 +00:00
ExprClassification.cpp [coroutines] Creation of promise object, lookup of operator co_await, building 2015-10-27 06:02:45 +00:00
ExprConstant.cpp Move global classes into anonymous namespaces. NFC. 2015-10-28 17:16:26 +00:00
ExprObjC.cpp Move functions declared in ExprObjC.h into ExprObjC.cpp. 2015-09-29 22:28:44 +00:00
ExternalASTSource.cpp Roll-back r250822. 2015-10-20 13:23:58 +00:00
InheritViz.cpp InheritViz: Hide implementation details 2015-03-09 15:03:20 +00:00
ItaniumCXXABI.cpp [MS ABI] Correctly mangle classes without names for linkage purposes 2015-08-31 18:48:39 +00:00
ItaniumMangle.cpp Add support for GCC's '__auto_type' extension, per the GCC manual: 2015-11-11 02:02:15 +00:00
Makefile
Mangle.cpp Remove and forbid raw_svector_ostream::flush() calls. 2015-08-13 18:12:56 +00:00
MicrosoftCXXABI.cpp [MS ABI] Mangle static anonymous unions 2015-10-22 07:15:56 +00:00
MicrosoftMangle.cpp Add support for GCC's '__auto_type' extension, per the GCC manual: 2015-11-11 02:02:15 +00:00
NSAPI.cpp [OpenCL] Add new types for OpenCL 2.0. 2015-09-15 11:18:52 +00:00
NestedNameSpecifier.cpp [UB] Fix the two ways that we would try to memcpy from a null buffer in 2015-08-04 03:52:56 +00:00
OpenMPClause.cpp [OPENMP 4.1] Codegen for array sections/subscripts in 'reduction' clause. 2015-10-08 09:10:53 +00:00
ParentMap.cpp Switch users of the 'for (StmtRange range = stmt->children(); range; ++range)‘ pattern to range for loops. 2015-07-02 21:03:14 +00:00
RawCommentList.cpp Allow any comment to be a trailing comment when -fparse-all-comments is on. 2015-07-15 19:13:39 +00:00
RecordLayout.cpp CXXInfo memory should be released after calling the destructor 2014-05-24 07:19:25 +00:00
RecordLayoutBuilder.cpp Don't adjust field offsets when using external record layout. 2015-10-01 22:08:02 +00:00
SelectorLocationsKind.cpp
Stmt.cpp Move functions declared in Stmt{ObjC,CXX}.h and OpenMPClause.h into 2015-10-02 13:41:04 +00:00
StmtCXX.cpp [coroutines] Creation of promise object, lookup of operator co_await, building 2015-10-27 06:02:45 +00:00
StmtIterator.cpp StmtIterator: Put stmt and decl group pointer into a union. 2015-07-03 15:12:36 +00:00
StmtObjC.cpp Move functions declared in Stmt{ObjC,CXX}.h and OpenMPClause.h into 2015-10-02 13:41:04 +00:00
StmtOpenMP.cpp Move functions declared in Stmt{ObjC,CXX}.h and OpenMPClause.h into 2015-10-02 13:41:04 +00:00
StmtPrinter.cpp [coroutines] Creation of promise object, lookup of operator co_await, building 2015-10-27 06:02:45 +00:00
StmtProfile.cpp [coroutines] Creation of promise object, lookup of operator co_await, building 2015-10-27 06:02:45 +00:00
StmtViz.cpp
TemplateBase.cpp [AST] ArrayRefize template argument packs. No functionality change intended. 2015-08-05 09:40:22 +00:00
TemplateName.cpp [AST] ArrayRefize template argument packs. No functionality change intended. 2015-08-05 09:40:22 +00:00
Type.cpp Add support for GCC's '__auto_type' extension, per the GCC manual: 2015-11-11 02:02:15 +00:00
TypeLoc.cpp Replace double-negated !SourceLocation.isInvalid() with SourceLocation.isValid(). 2015-10-03 05:15:57 +00:00
TypePrinter.cpp Add support for GCC's '__auto_type' extension, per the GCC manual: 2015-11-11 02:02:15 +00:00
VTTBuilder.cpp Update for LLVM API change to make Small(Ptr)Set::insert return pair<iterator, bool> as per the C++ standard's associative container concept. 2014-11-19 07:49:47 +00:00
VTableBuilder.cpp Roll-back r250822. 2015-10-20 13:23:58 +00:00