[PATCH] D49223: [AST] Check described template at structural equivalence check.

2018-08-07 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 159458. balazske marked an inline comment as done. balazske added a comment. - Renamed methods, simplified code, comments updated. Repository: rC Clang https://reviews.llvm.org/D49223 Files: include/clang/AST/ASTStructuralEquivalence.h lib/AST/ASTSt

[PATCH] D49796: [ASTImporter] Load external Decls when getting field index.

2018-08-07 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 159467. balazske added a comment. - Added common getFieldIndex. Repository: rC Clang https://reviews.llvm.org/D49796 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp test/ASTMerge/unnamed_fields/Inputs/il.cpp test/ASTMerge/unnamed_

[PATCH] D49796: [ASTImporter] Load external Decls when getting field index.

2018-08-08 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 159659. balazske added a comment. - Added common getFieldIndex. - Corrected test ImportUnnamedFieldsInCorrectOrder. Repository: rC Clang https://reviews.llvm.org/D49796 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp test/ASTMerge/u

[PATCH] D49796: [ASTImporter] Load external Decls when getting field index.

2018-08-08 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339226: [ASTImporter] Load external Decls when getting field index. (authored by balazske, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49796

[PATCH] D49223: [AST] Check described template at structural equivalence check.

2018-08-08 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC339256: [AST] Check described template at structural equivalence check. (authored by balazske, committed by ). Changed prior to commit: https://reviews.llvm.org/D49223?vs=159458&id=159725#toc Repositor

[PATCH] D50516: [ASTImporter] Improved import of friend templates.

2018-08-09 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, martong. Herald added a reviewer: a.sidorin. When importing a friend class template declaration, this declaration should not be merged with any other existing declaration for the same type. Otherwise the getFriendDecl of the Fr

[PATCH] D50516: [ASTImporter] Improved import of friend templates.

2018-08-13 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 160335. balazske added a comment. - replaced ASSERT in test Repository: rC Clang https://reviews.llvm.org/D50516 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp =

[PATCH] D50516: [ASTImporter] Improved import of friend templates.

2018-08-13 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339560: [ASTImporter] Improved import of friend templates. (authored by balazske, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D50516 Files:

[PATCH] D50672: [ASTImporter] Change the return result of Decl import to Optional

2018-08-14 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. This change is in conflict with our similar patch to introduce error handling in `ASTImporter`. That patch would be a much bigger one, because (almost) every import can fail, return of every `Import` (not only Decl) is changed from `X` to `Expected`. After every import

[PATCH] D49798: [ASTImporter] Adding some friend function related unittests.

2018-08-14 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 160548. balazske added a comment. - Corrected the code in tests. Repository: rC Clang https://reviews.llvm.org/D49798 Files: unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp ==

[PATCH] D49798: [ASTImporter] Adding some friend function related unittests.

2018-08-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 160972. balazske added a comment. - Renamed variables, corrected a variable type. Repository: rC Clang https://reviews.llvm.org/D49798 Files: unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp =

[PATCH] D49798: [ASTImporter] Adding some friend function related unittests.

2018-08-21 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340277: [ASTImporter] Adding some friend function related unittests. (authored by balazske, committed by ). Changed prior to commit: https://reviews.llvm.org/D49798?vs=160972&id=161715#toc Repository:

[PATCH] D47313: [ASTImporter] Corrected lookup at import of templated record decl

2018-05-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, martong. Herald added a reviewer: a.sidorin. When a CXXRecordDecl under ClassTemplateDecl is imported, check the templated record decl for similarity instead of the template. Repository: rC Clang https://reviews.llvm.org/D

[PATCH] D47445: [ASTImporter] Corrected diagnostic client handling in tests.

2018-05-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, martong. Herald added a reviewer: a.sidorin. ASTImporter tests may produce source file related warnings, the diagnostic client should be in correct state to handle it. Added 'beginSourceFile' to set the client state. Reposito

[PATCH] D47450: [ASTImporter] Use InjectedClassNameType at import of templated record.

2018-05-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, martong. Herald added a reviewer: a.sidorin. At import of a record describing a template set its type to InjectedClassNameType (instead of RecordType). Repository: rC Clang https://reviews.llvm.org/D47450 Files: lib/AST

[PATCH] D47450: [ASTImporter] Use InjectedClassNameType at import of templated record.

2018-05-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:2139 + CXXRecordDecl *Injected = nullptr; + for (NamedDecl *Found : D2CXX->noload_lookup(Name)) { +auto *Record = dyn_cast(Found); r.stahl wrote: > The only thing I'

[PATCH] D47459: [ASTImporter] Eliminated some unittest warnings.

2018-05-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: a.sidorin. When running the ASTTests test, warnings produced by the compiler can be distracting when looking for test errors. A part of the warnings is remov

[PATCH] D47459: [ASTImporter] Eliminated some unittest warnings.

2018-05-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Original idea was to not modify the test code to keep it as simple as possible. If you like it better I will change the test code. Repository: rC Clang https://reviews.llvm.org/D47459 ___ cfe-commits mailing list cfe-co

[PATCH] D47313: [ASTImporter] Corrected lookup at import of templated record decl

2018-05-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Yes, I have no commit permissions. Repository: rC Clang https://reviews.llvm.org/D47313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49293: [ASTImporter] Add support for import of CXXInheritedCtorInitExpr.

2018-07-25 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337898: [ASTImporter] Add support for import of CXXInheritedCtorInitExpr. (authored by balazske, committed by ). Changed prior to commit: https://reviews.llvm.org/D49293?vs=155838&id=157212#toc Reposit

[PATCH] D49796: [ASTImporter] Load external Decls when getting field index.

2018-07-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, martong. Herald added a reviewer: a.sidorin. At equality check of fields without name the index of fields is compared. At determining the index of a field all fields of the parent context should be loaded from external source t

[PATCH] D49798: [ASTImporter] Adding some friend function related unittests.

2018-07-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, martong. Herald added a reviewer: a.sidorin. Repository: rC Clang https://reviews.llvm.org/D49798 Files: unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp

[PATCH] D49223: [AST] Check described template at structural equivalence check.

2018-08-01 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTStructuralEquivalence.cpp:958 + if (D1->isTemplated() != D2->isTemplated()) +return false; a_sidorin wrote: > I think we can move the changes for both RecordDecl and FunctionDecl into > `Finish()` and

[PATCH] D49223: [AST] Check described template at structural equivalence check.

2018-08-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 159279. balazske added a comment. - Rebase, common checks at ASTStructuralEquivalenceContext Repository: rC Clang https://reviews.llvm.org/D49223 Files: include/clang/AST/ASTStructuralEquivalence.h lib/AST/ASTStructuralEquivalence.cpp unittests/AS

[PATCH] D47459: [ASTImporter] Eliminated some unittest warnings.

2018-05-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 149079. balazske added a comment. [ASTImporter] Fixed test code in ASTImporter tests. Test code is fixed instead of turn off the warnings. For this to work change of match expressions was needed. Repository: rC Clang https://reviews.llvm.org/D47459 Fil

[PATCH] D47367: [ASTImporter] Add ms compatibility to tests

2018-05-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske accepted this revision. balazske added a comment. This revision is now accepted and ready to land. Found no big problems. But not all extra options are applicable to all languages (template related things to C) so there may be redundant tests. Repository: rC Clang https://reviews.ll

[PATCH] D47450: [ASTImporter] Use InjectedClassNameType at import of templated record.

2018-05-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske requested review of this revision. balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:2131 D2CXX->setDescribedClassTemplate(ToDescribed); +if (!DCXX->isInjectedClassName()) { + // In a record describing a template the type shoul

[PATCH] D47450: [ASTImporter] Use InjectedClassNameType at import of templated record.

2018-05-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: test/ASTMerge/injected-class-name-decl-1/Inputs/inject1.cpp:16 +} // namespace google +namespace a { +template class g; a.sidorin wrote: > This looks like raw creduce output. Is there a way to simplify this or make >

[PATCH] D47445: [ASTImporter] Corrected diagnostic client handling in tests.

2018-05-31 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. If `BeginSourceFile` is not called on the diagnostic client object, it is not possible to have compiler warnings or errors that come from the "To" context while importing something (there is some assertion if a source file related warning is to be emitted but no source

[PATCH] D47445: [ASTImporter] Corrected diagnostic client handling in tests.

2018-05-31 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The new `ASTUnit::beginSourceFile` is only there to simplify the code. It is possible to get `Ctx`, `PP` and `getDiagnostic()` from outside of `ASTUnit` and call the same thing, but requires more code to write. Probably a more smart place to call `BeginSourceFile` can

[PATCH] D47532: [ASTImporter] Import the whole redecl chain of functions

2018-05-31 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:88 + llvm::SmallVector getCanonicalForwardRedeclChain(Decl* D) { +// Currently only FunctionDecl is supported +auto FD = cast(D); Assert for FunctionDecl? Comment at:

[PATCH] D47445: [ASTImporter] Corrected diagnostic client handling in tests.

2018-06-01 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 149412. balazske added a comment. - Added comment, renamed beginSourceFile, removed check for PP. Check for PP is removed because it is allowed to be nullptr. Repository: rC Clang https://reviews.llvm.org/D47445 Files: include/clang/Frontend/ASTUnit.

[PATCH] D47445: [ASTImporter] Corrected diagnostic client handling in tests.

2018-06-01 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. From API point of view if there is a `enableSourceFileDiagnostics` there should be a `disableSourceFileDiagnostics` too (that calls the `EndSourceFile`). But I am not sure how and if to use it at all. In the unit tests it is not needed, the ASTUnit contains a single en

[PATCH] D47946: [ASTmporter] Fix infinite recursion on function import with struct definition in parameters

2018-06-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Problem: This change interferes with https://reviews.llvm.org/D47445. Probably that should be committed, it is approved already. Repository: rC Clang https://reviews.llvm.org/D47946 ___ cfe-commits mailing list cfe-comm

[PATCH] D47445: [ASTImporter] Corrected diagnostic client handling in tests.

2018-06-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I want this change to be committed by somebody. I have no commit right. Repository: rC Clang https://reviews.llvm.org/D47445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D47698: [ASTImporter] import macro source locations

2018-06-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:1534 +} +TEST_P(ASTImporterTestBase, ImportSourceLocs) { + Decl *FromTU = getTuDecl( This test causes every case for expansion (macro, macro arg) to be executed at import? Repositor

[PATCH] D47459: [ASTImporter] Eliminated some unittest warnings.

2018-06-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 152632. balazske added a comment. [ASTImporter] Fixed test code in ASTImporter tests. Reformatted some test code, changed to use isDescendant. Repository: rC Clang https://reviews.llvm.org/D47459 Files: unittests/AST/ASTImporterTest.cpp Index: unitt

[PATCH] D47459: [ASTImporter] Eliminated some unittest warnings.

2018-06-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 2 inline comments as done. balazske added a comment. Some of the source code was reformatted for more consistency. At least a part of the code is now better formatted. Repository: rC Clang https://reviews.llvm.org/D47459 ___ cfe-

[PATCH] D47450: [ASTImporter] Use InjectedClassNameType at import of templated record.

2018-06-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 152634. balazske added a comment. Small fixes. Repository: rC Clang https://reviews.llvm.org/D47450 Files: lib/AST/ASTImporter.cpp test/ASTMerge/injected-class-name-decl/Inputs/inject1.cpp test/ASTMerge/injected-class-name-decl/Inputs/inject2.cpp

[PATCH] D51633: [ASTImporter] Added error handling for AST import.

2018-10-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 9 inline comments as done. balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:2683 +continue; + } else if (isa(Found)) +continue; a_sidorin wrote: > Same here. I do not know exactly why this was made, it looks

[PATCH] D51633: [ASTImporter] Added error handling for AST import.

2018-10-17 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. In the current version all clang tests do pass and most of the LLDB tests. Some LLDB tests do not work on my machine, the problems exist on master too. This code is still a temporary version (possible to commit now or wait until every change is made?). Later the `Import

[PATCH] D51633: [ASTImporter] Added error handling for AST import.

2018-10-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. To the reviewers: Please accept this patch formally if you do not find any problems. This is an intermediate state of the code and there is more work that is dependent on this change. Repository: rC Clang https://reviews.llvm.org/D51633 _

[PATCH] D51633: [ASTImporter] Added error handling for AST import.

2018-10-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:8197 -void ASTImporter::ImportDefinition(Decl *From) { +Error ASTImporter::ImportDefinition_New(Decl *From) { Decl *To = Import(From); a_sidorin wrote: > ImportDefinitionOrError? The intenti

[PATCH] D53751: [ASTImporter] Added Import functions for transition to new API.

2018-10-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, Szelethus, martong, dkrupp. Herald added a reviewer: a.sidorin. These Import_New functions should be used in the ASTImporter, and the old Import functions should not be used. Later the Import_New should be renamed to Import aga

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-10-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:5054 +if (!ToTemplated->getPreviousDecl()) { + auto *PrevTemplated = FoundByLookup->getTemplatedDecl()->getMostRecentDecl(); + if (ToTemplated != PrevTemplated) This is a long line

[PATCH] D53751: [ASTImporter] Added Import functions for transition to new API.

2018-10-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 171278. balazske added a comment. - Corrected Import_New(const Attr *) Repository: rC Clang https://reviews.llvm.org/D53751 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp Index: lib/AST/ASTImporter.cpp ==

[PATCH] D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter.

2018-10-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, Szelethus, martong, dkrupp. Herald added a reviewer: a.sidorin. Herald added a reviewer: a.sidorin. Repository: rC Clang https://reviews.llvm.org/D53757 Files: lib/AST/ASTImporter.cpp Index: lib/AST/ASTImporter.cpp =

[PATCH] D53755: [ASTImporter] Remove import of definition from GetAlreadyImportedOrNull

2018-10-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:7716 } } This can be simplified by removing brace characters and removing `ToD`. Repository: rC Clang https://reviews.llvm.org/D53755 ___

[PATCH] D53751: [ASTImporter] Added Import functions for transition to new API.

2018-10-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 171292. balazske added a comment. - Added missing Import_New with Selector and DeclarationName. Repository: rC Clang https://reviews.llvm.org/D53751 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp Index: lib/AST/ASTImporter.cpp =

[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

2018-10-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, Szelethus, martong, dkrupp. Herald added a reviewer: a.sidorin. Repository: rC Clang https://reviews.llvm.org/D53818 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp Index: lib/AST/ASTImporter.cpp ===

[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

2018-10-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The Import functions are replaced by Import_New and error handling is added. This is done in the implementation of the Import_New functions itself, and in importInto. (Code of old Import functions is moved to the Import_New and updated to use Import_New.) Some other fu

[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

2018-10-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 171519. balazske added a comment. Reformatted code. Repository: rC Clang https://reviews.llvm.org/D53818 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp Index: lib/AST/ASTImporter.cpp =

[PATCH] D56936: Fix handling of overriden methods during ASTImport

2019-01-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:3046 +if (!D->doesThisDeclarationHaveABody()) + return cast(const_cast(FoundByLookup)); +else { The `cast` should not be needed here (and is not done at the other return

[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

2019-01-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 182866. balazske added a comment. - Small style corrections. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53818/new/ https://reviews.llvm.org/D53818 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp Index

[PATCH] D56936: Fix handling of overriden methods during ASTImport

2019-01-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. So the problem is that there are references to `ParmVarDecl` from inside function body and at import of `ParmVarDecl` always a new one is created even if there is an already existing (in the existing function prototype)? Maybe it works in `VisitParmVarDecl` to search f

[PATCH] D56936: Fix handling of overriden methods during ASTImport

2019-01-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:2950 +ExpectedStmt ASTNodeImporter::ImportFunctionDeclBody( FunctionDecl *FromFD, FunctionDecl *ToFD ) { +if (Stmt *FromBody = FromFD->getBody()) { It would be better to return `Error` ins

[PATCH] D56936: Fix handling of overriden methods during ASTImport

2019-01-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:2312 + cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("B"; + auto BFPIsDefP = cxxMethodDecl( + hasName("f"), hasParent(cxxRecordDecl(hasName("B"))), isDefinition());

[PATCH] D57232: [ASTImporter] Check visibility/linkage of functions and variables

2019-01-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:2523 + Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl(); + cast(ToTU)->dumpDeclContext(); + ASSERT_EQ(DeclCounter().match(ToTU, functionDecl(hasName("f"))), Is this dump

[PATCH] D57322: [ASTImporter] Refactor unittests to be able to parameterize them in a more flexible way

2019-01-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:15 +// FIXME: Better solution for this? +#define GTEST_HAS_COMBINE 1 + Define of this is related to the new visibility tests, but not a problem is this remains here (there is another n

[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

2018-11-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 3 inline comments as done. balazske added a comment. If we change signature of `Import` now, other parts of the code (in clang and LLDB) would not compile (without changing to use the new kind of Import). If there is a `Import_New` the old code can still compile and can be change

[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

2018-11-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 174168. balazske added a comment. - Small style corrections. Repository: rC Clang https://reviews.llvm.org/D53818 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp Index: lib/AST/ASTImporter.cpp

[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

2018-11-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: include/clang/AST/ASTImporter.h:192 /// -/// \returns the equivalent declaration in the "to" context, or a NULL type -/// if an error occurred. +/// \returns The equivalent declaration in the "to" context, or the import

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/DeclBase.cpp:1469 assert(Pos != Map->end() && "no lookup entry for decl"); -if (Pos->second.getAsVector() || Pos->second.getAsDecl() == ND) +// Remove the decl only if it is contained. +if ((Pos-

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I see that now everything is reverted, the "good" things too (change to indirectFieldDecl and a line split)? Repository: rC Clang https://reviews.llvm.org/D53655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske accepted this revision. balazske added a comment. This revision is now accepted and ready to land. Do not forget that there is a fix the to use getMostRecentDecl in ASTImporter.cpp line 2666 here. Repository: rC Clang https://reviews.llvm.org/D53655 __

[PATCH] D53751: [ASTImporter] Added Import functions for transition to new API.

2018-11-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 175207. balazske added a comment. - Split long lines. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53751/new/ https://reviews.llvm.org/D53751 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp Index: lib/A

[PATCH] D53751: [ASTImporter] Added Import functions for transition to new API.

2018-11-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 175212. balazske marked an inline comment as done. balazske added a comment. - Split long lines (ASTImporter.cpp). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53751/new/ https://reviews.llvm.org/D53751 Files: include/cl

[PATCH] D53751: [ASTImporter] Added Import functions for transition to new API.

2018-11-27 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 175529. balazske added a comment. - Corrected Import_New(const Attr *) - Added missing Import_New with Selector and DeclarationName. - Split long lines. - Split long lines (ASTImporter.cpp). Rebase to newest master. Repository: rC Clang CHANGES SINCE LA

[PATCH] D53751: [ASTImporter] Added Import functions for transition to new API.

2018-11-27 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347685: [ASTImporter] Added Import functions for transition to new API. (authored by balazske, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION h

[PATCH] D53751: [ASTImporter] Added Import functions for transition to new API.

2018-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. It is really "ugly" thing to have a Import_New and a Import for the same functionality. Without these a single large patch would have been needed for clang and another smaller one for LLDB that must be committed "at the same time". Now 1 dependent patch is under review

[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

2018-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 175649. balazske added a comment. Rebase to newest master. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53818/new/ https://reviews.llvm.org/D53818 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp Index:

[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

2018-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347752: [ASTImporter] Changed use of Import to Import_New in ASTImporter. (authored by balazske, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION

[PATCH] D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter.

2018-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 175675. balazske added a comment. Herald added a reviewer: shafik. Herald added a subscriber: gamesh411. Rebase to master. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53757/new/ https://reviews.llvm.org/D53757 Files: li

[PATCH] D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter.

2018-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 175821. balazske added a comment. - Changed every use of ASTImporter::Import to Import_New Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53757/new/ https://reviews.llvm.org/D53757 Files: lib/AST/ASTImporter.cpp lib/AST/

[PATCH] D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter.

2018-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 175822. balazske added a comment. Removing previous wrong update. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53757/new/ https://reviews.llvm.org/D53757 Files: lib/AST/ASTImporter.cpp Index: lib/AST/ASTImporter.cpp ===

[PATCH] D55049: Changed every use of ASTImporter::Import to Import_New

2018-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, martong, dkrupp. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Repository: rC Clang https://reviews.llvm.org/D55049 Files: lib/AST/ExternalASTMerger.cpp lib/CrossTU/CrossTran

[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

2018-11-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske reopened this revision. balazske added a comment. This revision is now accepted and ready to land. Reopening to fix failing lldb tests. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53818/new/ https://reviews.llvm.org/D53818 ___

[PATCH] D55049: Changed every use of ASTImporter::Import to Import_New

2018-11-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 175864. balazske added a comment. - Changed some missing Import calls. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55049/new/ https://reviews.llvm.org/D55049 Files: lib/AST/ASTImporter.cpp lib/AST/ExternalASTMerger.cp

[PATCH] D55280: [CTU] Remove redundant error check

2018-12-05 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: include/clang/CrossTU/CrossTranslationUnit.h:121 + /// \return Returns a pointer to the ASTUnit that contains the definition of + /// the looked up function. The pointer should not be a nullptr. /// Return value de

[PATCH] D55358: [ASTImporter] Fix import of NestedNameSpecifierLoc.

2018-12-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, martong, dkrupp. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Import type location in case of TypeSpec and TypeSpecWithTemplate. Without this fix the imported NespedNameSpecifierLoc

[PATCH] D57590: [ASTImporter] Improve import of FileID.

2019-02-27 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Currently there is no direct test for `ASTImporter` `FileID` (and other non-Decl) import. These are tested indirectly by other import tests. There is something that fails in a macOS LLDB test without this. Repository: rC Clang CHANGES SINCE LAST ACTION https://re

[PATCH] D57590: [ASTImporter] Improve import of FileID.

2019-02-27 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC355000: [ASTImporter] Improve import of FileID. (authored by balazske, committed by ). Changed prior to commit: https://reviews.llvm.org/D57590?vs=184760&id=188553#toc Repository: rC Clang CHANGES S

[PATCH] D58743: Handle built-in when importing SourceLocation and FileID

2019-02-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: include/clang/AST/ASTImporter.h:342 // FIXME: Remove this version. -FileID Import(FileID); +FileID Import(FileID, bool isBuiltin=false); teemperor wrote: > `IsBuiltin`, not `isBuiltin` `IsBuiltin = false`

[PATCH] D58743: Handle built-in when importing SourceLocation and FileID

2019-03-01 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Looks good now. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58743/new/ https://reviews.llvm.org/D58743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

2019-03-07 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 189696. balazske added a comment. Herald added a reviewer: martong. Herald added a subscriber: jdoerfert. - Small style corrections. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53818/new/ https://reviews.llvm.org/D53818 F

[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

2019-03-07 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC355598: [ASTImporter] Changed use of Import to Import_New in ASTImporter. (authored by balazske, committed by ). Changed prior to commit: https://reviews.llvm.org/D53818?vs=189696&id=189704#toc Reposit

[PATCH] D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter.

2019-03-08 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 189824. balazske added a comment. Rebase (old patch applied without changes). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53757/new/ https://reviews.llvm.org/D53757 Files: lib/AST/ASTImporter.cpp Index: lib/AST/ASTImpo

[PATCH] D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter.

2019-03-08 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. This is the next part of the changes for error handling. D53818 was for `ASTImporter` functions only, this is for `ASTNodeImporter` (the `Import_New` functions are not used at many places directly because mostly the few import template

[PATCH] D59134: [ASTImporter] Remove obsolete function ImportTemplateParameterList.

2019-03-08 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. The ASTNodeImporter::ImportTemplateParameterList is replaced by

[PATCH] D55358: [ASTImporter] Fix import of NestedNameSpecifierLoc.

2019-03-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 190056. balazske added a comment. Rebase. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55358/new/ https://reviews.llvm.org/D55358 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index: unittests/AST/

[PATCH] D55358: [ASTImporter] Fix import of NestedNameSpecifierLoc.

2019-03-14 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356151: [ASTImporter] Fix import of NestedNameSpecifierLoc. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SIN

[PATCH] D59485: [ASTImporter] Allow adding a shim to the ASTImporter

2019-03-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I do not know if "Shim" is the correct name for this, maybe "Strategy" is better? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59485/new/ https://reviews.llvm.org/D59485 ___ cfe-commits ma

[PATCH] D59485: [ASTImporter] Allow adding a shim to the ASTImporter

2019-03-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The replace of `Import` calls may work if the internal state of the `ASTImporter` is updated correctly from the 'shim' object (especially if not every Decl is handled by the shim). For this to work some of the state of `ASTImporter` that was intended to be internal mus

[PATCH] D59485: [ASTImporter] Allow adding a import strategy to the ASTImporter

2019-03-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. It looks better now. One "problem" is that now there is the strategy and there is the `Imported` function. It would be possible to unify these into a strategy that contains maybe a "import" and a "post-import" callback. (But this requires big changes in the `ASTImporte

[PATCH] D59485: [ASTImporter] Allow adding a import strategy to the ASTImporter

2019-03-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Another observation: The `Import` function of the strategy now has no way to return an error. An even better version of it would be to include the possibility of import error (with `ImportError`, or other error type). Or the "PreImport" function could indicate if the D

[PATCH] D59485: [ASTImporter] Allow adding a import strategy to the ASTImporter

2019-03-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. By the way if the `Import` of the strategy uses recursive import of other things this can cause same problems as it was in `ASTImporter` before the `GetImportedOrCreateDecl` was introduced. So this should be avoided or something similar to `GetImportedOrCreateDecl` mus

[PATCH] D59595: Remove the unused return value in ASTImporter::Imported [NFC]

2019-03-20 Thread Balázs Kéri via Phabricator via cfe-commits
balazske accepted this revision. balazske added a comment. This revision is now accepted and ready to land. I would prefer an observer-like solution but I am not against this change. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59595/new/ https://reviews.llvm.or

[PATCH] D59134: [ASTImporter] Remove obsolete function ImportTemplateParameterList.

2019-03-20 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356564: [ASTImporter] Remove obsolete function ImportTemplateParameterList. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to c

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7738 +Expected ASTImporter::ImportInternal(Decl *FromD) { + // Import the declaration. + ASTNodeImporter Importer(*this); Comment can be better: Import it using ASTNodeImporter. ===

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:583 + // Returns a ImporterConstructor that constructs this class. + static ASTImporterOptionSpecificTestBase::ImporterConstructor + getConstructor() { balazske wrote: > Is it

  1   2   3   4   5   6   7   8   9   10   >