clang/lib/AST
Gabor Marton f98dc5ceb3 [ASTImporter] Fix import of VarDecl init
Summary:
The init expression of a VarDecl is overwritten in the "To" context if we
import a VarDecl without an init expression (and with a definition).  Please
refer to the added tests, especially InitAndDefinitionAreInDifferentTUs.  This
patch fixes the malfunction by importing the whole Decl chain similarly as we
did that in case of FunctionDecls.  We handle the init expression similarly to
a  definition, alas only one init expression will be in the merged ast.

Reviewers: a_sidorin, xazax.hun, r.stahl, a.sidorin

Subscribers: rnkovacs, dkrupp, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342384 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-17 12:04:52 +00:00
..
APValue.cpp Fix crash on call to __builtin_memcpy with a null pointer to an 2018-09-13 22:47:33 +00:00
ASTConsumer.cpp Move LocInfoType from Sema to AST. 2016-02-01 17:42:01 +00:00
ASTContext.cpp [clang-cl] Fix PR38934: failing to dllexport class template member w/ explicit instantiation and PCH 2018-09-14 15:18:30 +00:00
ASTDiagnostic.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
ASTDumper.cpp Consistently create a new declaration when merging a pre-existing but 2018-09-12 02:13:47 +00:00
ASTImporter.cpp [ASTImporter] Fix import of VarDecl init 2018-09-17 12:04:52 +00:00
ASTStructuralEquivalence.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
ASTTypeTraits.cpp Teach clang-query to dump types. I couldn't find any existing tests for clang-query's dumping functionality. =( 2016-11-02 23:57:18 +00:00
AttrImpl.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
CMakeLists.txt [C++2a] Implement operator<=> CodeGen and ExprConstant 2018-05-07 21:07:10 +00:00
CXXABI.h Fix __has_unique_object_representations implementation 2017-11-30 16:37:02 +00:00
CXXInheritance.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
Comment.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
CommentBriefParser.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
CommentCommandTraits.cpp Fix for PR21254 - Assertion in comment parser 2014-10-15 16:18:20 +00:00
CommentLexer.cpp Add a newline to SourceLocation dump output 2018-08-15 20:32:06 +00:00
CommentParser.cpp [cleanup] Remove excessive padding from TextTokenRetokenizer::Position 2016-09-20 18:32:48 +00:00
CommentSema.cpp Port getLocEnd -> getEndLoc 2018-08-09 21:09:38 +00:00
ComparisonCategories.cpp [C++2a] Implement operator<=>: Address bugs and post-commit review comments after r331677. 2018-05-08 00:52:19 +00:00
DataCollection.cpp [analyzer] Make StmtDataCollector customizable 2017-08-23 16:28:26 +00:00
Decl.cpp Revert r341754. 2018-09-09 05:22:49 +00:00
DeclBase.cpp Generate unique identifiers for Decl objects 2018-09-15 02:03:58 +00:00
DeclCXX.cpp Fix assertion failure when emitting code for a merged lambda. 2018-08-02 20:30:52 +00:00
DeclFriend.cpp [AST] Fix some Clang-tidy modernize-use-auto warnings; other minor fixes (NFC). 2018-04-03 00:11:50 +00:00
DeclGroup.cpp [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-11-10 00:59:22 +00:00
DeclObjC.cpp [Sema][ObjC] Infer availability of +new from availability of -init. 2018-09-10 22:20:09 +00:00
DeclOpenMP.cpp Port getLocEnd -> getEndLoc 2018-08-09 21:09:38 +00:00
DeclPrinter.cpp StmtPrinter: allow customizing the end-of-line character 2018-09-15 02:02:31 +00:00
DeclTemplate.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
DeclarationName.cpp [AST] Remove unnecessary indirections in DeclarationNameTable 2018-08-06 16:47:31 +00:00
Expr.cpp Port getLocEnd -> getEndLoc 2018-08-09 21:09:38 +00:00
ExprCXX.cpp Port getLocEnd -> getEndLoc 2018-08-09 21:09:38 +00:00
ExprClassification.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
ExprConstant.cpp Fix crash on call to __builtin_memcpy with a null pointer to an 2018-09-13 22:47:33 +00:00
ExprObjC.cpp [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-11-30 22:33:48 +00:00
ExternalASTMerger.cpp [ASTImporter] Refactor Decl creation 2018-07-12 09:42:05 +00:00
ExternalASTSource.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
InheritViz.cpp InheritViz: Hide implementation details 2015-03-09 15:03:20 +00:00
ItaniumCXXABI.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
ItaniumMangle.cpp Append new attributes to the end of an AttributeList. 2018-08-03 01:21:16 +00:00
Linkage.h Give external linkage and mangling to lambdas inside inline variables and variable templates. 2017-09-22 04:25:05 +00:00
Mangle.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
MicrosoftCXXABI.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
MicrosoftMangle.cpp ms: Insert $$Z in mangling between directly consecutive parameter packs. 2018-09-08 20:58:39 +00:00
NSAPI.cpp [Sema][ObjC] Infer availability of +new from availability of -init. 2018-09-10 22:20:09 +00:00
NestedNameSpecifier.cpp [AST] Fix a crash on invalid. 2018-09-10 21:54:04 +00:00
ODRHash.cpp [ODRHash] Fix early exit that skipped code. 2018-09-14 01:15:28 +00:00
OpenMPClause.cpp [OPENMP] Fix emission of the loop doacross constructs. 2018-08-13 19:04:24 +00:00
ParentMap.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
QualTypeNames.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
RawCommentList.cpp Port getLocEnd -> getEndLoc 2018-08-09 21:09:38 +00:00
RecordLayout.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
RecordLayoutBuilder.cpp Improve support of PDB as an external layout source 2018-07-31 08:27:06 +00:00
SelectorLocationsKind.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
Stmt.cpp [analyzer] Further printing improvements: use declarations, 2018-09-15 02:34:45 +00:00
StmtCXX.cpp [AST] Use llvm::TrailingObjects in CXXTryStmt 2018-07-23 12:45:24 +00:00
StmtIterator.cpp [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-11-21 23:26:08 +00:00
StmtObjC.cpp Port getLocEnd -> getEndLoc 2018-08-09 21:09:38 +00:00
StmtOpenMP.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
StmtPrinter.cpp StmtPrinter: allow customizing the end-of-line character 2018-09-15 02:02:31 +00:00
StmtProfile.cpp [ODRHash] Extend hash to support all Type's. 2018-09-04 22:53:19 +00:00
StmtViz.cpp Adapt to the DOTGraphTraits changes in LLVM. 2009-11-30 14:16:05 +00:00
TemplateBase.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
TemplateName.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
Type.cpp Model type attributes as regular Attrs. 2018-08-20 21:47:29 +00:00
TypeLoc.cpp Model type attributes as regular Attrs. 2018-08-20 21:47:29 +00:00
TypePrinter.cpp [Sema/Attribute] Make types declared with address_space an AttributedType 2018-08-27 17:57:29 +00:00
VTTBuilder.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
VTableBuilder.cpp Remove trailing space 2018-07-30 19:24:48 +00:00