[PATCH] D49840: [AST] Add MatchFinder::matchSubtree

2018-07-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > Usually we use match(anyOf(node), hasDescendant(node)). Or did I > misunderstand what you want? My understanding is that, the free function template `match` uses `MatchFinder::matchAST`, which will start the traverse from the TranslationUnitDecl. And there is no

[PATCH] D49840: [AST] Add MatchFinder::matchSubtree

2018-07-27 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > If you know the node is a decl, wrapping it in decl() should be enough. > Does this work? > auto WrappedMatcher = decl(anyOf(...)); Unfortunately this gives again the private ctor error (the same error when I called explicitly the overload with the

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

2018-07-27 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM. Repository: rC Clang https://reviews.llvm.org/D49223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50428: [ASTImporter] Add support for importing imaginary literals

2018-08-09 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339334: Add support for importing imaginary literals (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D50444: [ASTImporter] Fix structural inequivalency of forward EnumDecl

2018-08-09 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339336: Fix structural inequivalency of forward EnumDecl (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D50428: Add support for importing imaginary literals

2018-08-08 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 159662. martong added a comment. Remove superflous newline Repository: rC Clang https://reviews.llvm.org/D50428 Files: include/clang/ASTMatchers/ASTMatchers.h lib/AST/ASTImporter.cpp lib/ASTMatchers/ASTMatchersInternal.cpp

[PATCH] D50428: Add support for importing imaginary literals

2018-08-08 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a_sidorin, r.stahl, xazax.hun. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. Repository: rC Clang https://reviews.llvm.org/D50428 Files: include/clang/ASTMatchers/ASTMatchers.h lib/AST/ASTImporter.cpp

[PATCH] D50451: Fix import of class templates partial specialization

2018-08-08 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a_sidorin, xazax.hun, r.stahl. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. Currently there are several issues with the import of class template specializations. (1) Different TUs may have class template specializations with the

[PATCH] D50792: [ASTImporter] Add test for member pointer types.

2018-08-16 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. LGTM. Repository: rC Clang https://reviews.llvm.org/D50792 ___ cfe-commits mailing list

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-08-16 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added inline comments. This revision is now accepted and ready to land. Comment at: lib/AST/ASTImporter.cpp:1317 + for (auto *D : FromRD->decls()) { +Decl *ToD = Importer.GetAlreadyImportedOrNull(D); +assert(ToRD ==

[PATCH] D50811: [ASTImporter] Add test for WhileStmt

2018-08-16 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. LGTM. Repository: rC Clang https://reviews.llvm.org/D50811 ___ cfe-commits mailing list

[PATCH] D50813: [ASTImporter] Add test for IndirectGotoStmt

2018-08-16 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. LGTM. Repository: rC Clang https://reviews.llvm.org/D50813 ___ cfe-commits mailing list

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

2018-08-16 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > Yes, I was thinking about it too. The reason why I chose Optional was that > ASTImporter clients don't use the error kind. If you have any plans on > changing this, Expected is a preferred approach. Yes, we plan to submit a patch to LLDB too which would apply the use

[PATCH] D50810: [ASTImporter] Add test for DoStmt

2018-08-16 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. LGTM. Repository: rC Clang https://reviews.llvm.org/D50810 ___ cfe-commits mailing list

[PATCH] D50793: [ASTImporter] Add test for importing CompoundAssignOperators

2018-08-16 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. Looks good. Repository: rC Clang https://reviews.llvm.org/D50793 ___ cfe-commits mailing list

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

2018-08-14 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Roughly, this is the direction where we are heading with `Expected`: https://github.com/Ericsson/clang/pull/457/commits/783b7f5cce9de589a5c3c3ae983398cf499077ec (If you are interested, here is our whole thought process: https://github.com/Ericsson/clang/pull/457)

[PATCH] D49840: [AST] Add MatchFinder::matchSubtree

2018-08-06 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Ping. Manuel, I still don't see how could we apply `match(anyOf(node), hasDescendant(node))` to the problem of general subtree traversal. (I'd like to have support for not just `decl()` but other kind of nodes too.) Could you please advise how to move on? Also, could

[PATCH] D49792: [ASTmporter] SourceRange-free function parameter checking for declarations

2018-08-06 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339018: [ASTmporter] SourceRange-free function parameter checking for declarations (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D50451: [ASTImporter] Fix import of class templates partial specialization

2018-08-14 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 160552. martong added a comment. - Add new test - Fix indentation Repository: rC Clang https://reviews.llvm.org/D50451 Files: include/clang/ASTMatchers/ASTMatchers.h lib/AST/ASTImporter.cpp lib/ASTMatchers/ASTMatchersInternal.cpp

[PATCH] D50451: [ASTImporter] Fix import of class templates partial specialization

2018-08-14 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:4551 + for (auto *FromField : D->fields()) +Importer.Import(FromField); + martong wrote: > a_sidorin wrote: > > The result of import is

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-08-14 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:1317 + for (auto *D : FromRD->decls()) { +Decl *ToD = Importer.GetAlreadyImportedOrNull(D); +assert(ToRD == ToD->getDeclContext() && ToRD->containsDecl(ToD)); Is it sure that `ToD` will

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

2018-08-14 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi Aleksei, Thank you for this patch. With Balazs, we are working on something similar, but with a different, fine grained error value mechanism. Unfortunately we were not aware of that you have been working on error handling, and we didn't say that we are working on

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

2018-08-14 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > Do you think we can hold back this patch for a few days until Balazs prepares > the Expected based version? Then I think we could compare the patches and > we could merge the best from the two of them. I mean, once Balazs is also ready, then we can create a combined

[PATCH] D50451: [ASTImporter] Fix import of class templates partial specialization

2018-08-14 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 5 inline comments as done. martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:2872 Importer.MapImported(D, FoundField); +// In case of a FieldDecl of a ClassTemplateSpecializationDecl, the +// initializer of a FieldDecl

[PATCH] D50451: [ASTImporter] Fix import of class templates partial specialization

2018-08-14 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:4550 + // in the "From" context, but not in the "To" context. + for (auto *FromField : D->fields()) +Importer.Import(FromField); martong wrote: > a_sidorin wrote: > > Importing

[PATCH] D50444: Fix structural inequivalency of forward EnumDecl

2018-08-08 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a_sidorin, r.stahl, xazax.hun. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. Currently we consider one forward declared RecordDecl and another with a definition equal. We have to do the same in case of enums. Repository: rC

[PATCH] D50451: [ASTImporter] Fix import of class templates partial specialization

2018-08-21 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 161699. martong added a comment. - Add one more TODO to import instantiated exception specifications Repository: rC Clang https://reviews.llvm.org/D50451 Files: include/clang/ASTMatchers/ASTMatchers.h lib/AST/ASTImporter.cpp

[PATCH] D51001: [ASTImporter] Add test for CXXForRangeStmt

2018-08-21 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. LGTM. Repository: rC Clang https://reviews.llvm.org/D51001 ___ cfe-commits mailing list

[PATCH] D50451: [ASTImporter] Fix import of class templates partial specialization

2018-08-21 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 161698. martong marked an inline comment as done. martong added a comment. - Change comments Repository: rC Clang https://reviews.llvm.org/D50451 Files: include/clang/ASTMatchers/ASTMatchers.h lib/AST/ASTImporter.cpp

[PATCH] D50451: [ASTImporter] Fix import of class templates partial specialization

2018-08-21 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:4550 + // in the "From" context, but not in the "To" context. + for (auto *FromField : D->fields()) +Importer.Import(FromField);

[PATCH] D50451: [ASTImporter] Fix import of class templates partial specialization

2018-08-22 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340402: Fix import of class templates partial specialization (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D49296: [ASTImporter] Fix import of unnamed structs

2018-07-17 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337267: [ASTImporter] Fix import of unnamed structs (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49296 Files:

[PATCH] D49300: [ASTImporter] Fix poisonous structural equivalence cache

2018-07-17 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 155858. martong added a comment. - Add comment about structural eq and BFS Repository: rC Clang https://reviews.llvm.org/D49300 Files: include/clang/AST/ASTStructuralEquivalence.h lib/AST/ASTImporter.cpp lib/AST/ASTStructuralEquivalence.cpp

[PATCH] D49300: [ASTImporter] Fix poisonous structural equivalence cache

2018-07-17 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @a_sidorin Ok, thanks Aleksei for the review. I added the explanation as file comments into `StructuralEquivalence.cpp`. Repository: rC Clang https://reviews.llvm.org/D49300 ___ cfe-commits mailing list

[PATCH] D49300: [ASTImporter] Fix poisonous structural equivalence cache

2018-07-17 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337275: [ASTImporter] Fix poisonous structural equivalence cache (authored by martong, committed by ). Changed prior to commit: https://reviews.llvm.org/D49300?vs=155858=155863#toc Repository: rC

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-07-18 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Just added a new entry to our roadmap: https://github.com/Ericsson/clang/issues/435 Repository: rC Clang https://reviews.llvm.org/D30691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-07-18 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @NoQ , @dkrupp CallEvent::getRuntimeDefinition is overwritten in - AnyFunctionCall - CXXInstanceCall - CXXMemberCall - CXXDestructorCall - ObjCMethodCall AnyFunctionCall handles the CTU logic. CXXInstanceCall calls into AnyFunctionCall if the function is not virtual.

[PATCH] D49300: [ASTImporter] Fix poisonous structural equivalence cache

2018-07-16 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi Aleksei, Unfortunately, it seems that it is very to hard synthesize a lit or unit test for this fix. I have found this flaw during the CTU analysis of Bitcoin, where the AST was immense. Because of the lack of tests, now I am trying to persuade you based on some

[PATCH] D49296: [ASTImporter] Fix import of unnamed structs

2018-07-16 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 155660. martong marked 6 inline comments as done. martong added a comment. Address review comments Repository: rC Clang https://reviews.llvm.org/D49296 Files: lib/AST/ASTStructuralEquivalence.cpp unittests/AST/ASTImporterTest.cpp

[PATCH] D49296: [ASTImporter] Fix import of unnamed structs

2018-07-16 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: lib/AST/ASTStructuralEquivalence.cpp:913 - if (D1->isAnonymousStructOrUnion() && D2->isAnonymousStructOrUnion()) { + if (!D1->getDeclName() && !D2->getDeclName()) { // If both anonymous structs/unions are in a record context,

[PATCH] D49296: [ASTImporter] Fix import of unnamed structs

2018-07-16 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 155678. martong added a comment. RecordDecl* -> RecordDecl * Repository: rC Clang https://reviews.llvm.org/D49296 Files: lib/AST/ASTStructuralEquivalence.cpp unittests/AST/ASTImporterTest.cpp unittests/AST/StructuralEquivalenceTest.cpp Index:

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

2018-07-24 Thread Gabor Marton via Phabricator via cfe-commits
martong added a reviewer: a_sidorin. martong added a comment. Ping. Repository: rC Clang https://reviews.llvm.org/D49223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49296: [ASTImporter] Fix import of unnamed structs

2018-07-17 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 155835. martong marked an inline comment as done. martong added a comment. Remove unneeded assert Repository: rC Clang https://reviews.llvm.org/D49296 Files: lib/AST/ASTStructuralEquivalence.cpp unittests/AST/ASTImporterTest.cpp

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

2018-09-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. This patch is huge, but we change here almost all implementation functions of `ASTNodeImporter` to return with either `Error` or with `Expected`. We could not really come up with a cohesive but smaller patch because of the recursive nature of the importer. (We are open

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

2018-09-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Here is the `Expected` based patch: https://reviews.llvm.org/D51633 Repository: rC Clang https://reviews.llvm.org/D50672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51533: [ASTImporter] Merge ExprBits

2018-08-31 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a_sidorin, r.stahl, xazax.hun. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Some `Expr` classes set up default values for the `ExprBits` of `Stmt`. These default values are then overwritten by

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2018-09-05 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. From this little information I have hear are my thoughts: > match callExpr(allOf (callee(functionDecl(hasName("std::sort"))), > hasArgument(0, > hasDescendant(declRefExpr(to(fieldDecl(hasName("value_type")) I think this is a good direction, but keep

[PATCH] D48773: [ASTImporter] Fix import of objects with anonymous types

2018-07-05 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 154187. martong added a comment. `PrevDecl` is set after the `!SearchName` branch, as it had been done before. This way original behaviour is kept as much as possible. Repository: rC Clang https://reviews.llvm.org/D48773 Files: lib/AST/ASTImporter.cpp

[PATCH] D48773: [ASTImporter] Fix import of objects with anonymous types

2018-07-05 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336332: [ASTImporter] Fix import of objects with anonymous types (authored by martong, committed by ). Changed prior to commit: https://reviews.llvm.org/D48773?vs=154187=154192#toc Repository: rC

[PATCH] D48773: [ASTImporter] Fix import of objects with anonymous types

2018-07-04 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:2085 } + } else { +if (!IsStructuralMatch(D, FoundRecord, false)) balazske wrote: > martong wrote: > > a_sidorin wrote:

[PATCH] D48941: [ASTImporter] import FunctionDecl end locations

2018-07-06 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D48941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-07-10 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Ping Repository: rC Clang https://reviews.llvm.org/D44100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-07-10 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Ping. https://reviews.llvm.org/D47946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-07-11 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @gerazo, Do you have commit rights, or should I help with the commit? https://reviews.llvm.org/D47946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47632: [ASTImporter] Refactor Decl creation

2018-07-11 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi Aleksei, could you pleas take an other quick look, there were only minor changes since your last comments. Thanks! Repository: rC Clang https://reviews.llvm.org/D47632 ___ cfe-commits mailing list

[PATCH] D47632: [ASTImporter] Refactor Decl creation

2018-07-06 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 154421. martong added a comment. Fix indentation Repository: rC Clang https://reviews.llvm.org/D47632 Files: include/clang/AST/ASTImporter.h include/clang/AST/ASTStructuralEquivalence.h include/clang/AST/DeclBase.h lib/AST/ASTImporter.cpp

[PATCH] D47632: [ASTImporter] Refactor Decl creation

2018-07-06 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 154418. martong added a comment. - Rebase from master - Enable some disabled tests - Update the isUsed flag - Add a new config `Minimal` to the structural eq check, so lldb tests can pass now - Return with a bool value and use LLVM_NODISCARD in CreateDecl -

[PATCH] D47632: [ASTImporter] Refactor Decl creation

2018-07-13 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > I apologize for the delay in reviewing patches. There is no need to apologize. On the contrary, we (me and my colleges at Ericsson) would like to thank you for the effort you had put into reviewing these patches. This period was hard, we provided so many patches

[PATCH] D49296: [ASTImporter] Fix import of unnamed structs

2018-07-13 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a.sidorin, a_sidorin, balazske, gerazo. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. https://reviews.llvm.org/D48773 simplified ASTImporter nicely, but it introduced a new error: Unnamed structs are not imported correctly, if

[PATCH] D49300: [ASTImporter] Fix poisonous structural equivalence cache

2018-07-13 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a.sidorin, a_sidorin, r.stahl. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. Implementation functions call into the member functions of ASTStructuralEquivalence, thus they can falsely alter the DeclsToCheck state (they add decls).

[PATCH] D48722: [ASTImporter] Update isUsed flag at Decl import.

2018-07-12 Thread Gabor Marton via Phabricator via cfe-commits
martong abandoned this revision. martong added a comment. Closed in favor of https://reviews.llvm.org/D47632 Repository: rC Clang https://reviews.llvm.org/D48722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47632: [ASTImporter] Refactor Decl creation

2018-07-12 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336896: [ASTImporter] Refactor Decl creation (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D47632?vs=154582=155134#toc

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

2018-07-12 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336898: [ASTImporter] Fix infinite recursion on function import with struct definition… (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D47632: [ASTImporter] Refactor Decl creation

2018-07-09 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 154582. martong marked 6 inline comments as done. martong added a comment. Address review comments Repository: rC Clang https://reviews.llvm.org/D47632 Files: include/clang/AST/ASTImporter.h include/clang/AST/ASTStructuralEquivalence.h

[PATCH] D47632: [ASTImporter] Refactor Decl creation

2018-07-09 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:161 + ToD->IdentifierNamespace = FromD->IdentifierNamespace; + if (FromD->hasAttrs()) +for (const Attr *FromAttr : FromD->getAttrs()) a_sidorin wrote: > Should we move the below

[PATCH] D48941: [ASTImporter] import FunctionDecl end locations

2018-07-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:2559 D->isImplicit()); +ToFunction->setRangeEnd(Importer.Import(D->getLocEnd())); } else if (auto *FromConversion = dyn_cast(D)) { Why don't we

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-08 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 137563. martong marked 15 inline comments as done. martong added a comment. Fix code review comments. Repository: rC Clang https://reviews.llvm.org/D43967 Files: unittests/AST/ASTImporterTest.cpp unittests/AST/DeclMatcher.h Index:

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-08 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:170 +ASTContext = ToAST->getASTContext(); +vfs::OverlayFileSystem *OFS = static_cast( + ToCtx.getSourceManager().getFileManager().getVirtualFileSystem().get());

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-03-06 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Aleksei, We should definitely try to synchronize our work between Samsung (?) and Ericsson much much more. Unfortunately, it is often we work on the same issue and this can cause delays for both of us. Actually, we solved the same issue in our branch a year ago, see

[PATCH] D46019: [ASTImporter] Fix isa cast assert

2018-04-24 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a.sidorin, xazax.hun, szepet. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. Do early return if we can't import the found decl for a member expr. This follows the pre-existing scheme, e.g with E->getMemberDecl(). Repository: rC

[PATCH] D46019: [ASTImporter] Fix isa cast assert

2018-04-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi Aleksei, Thanks for the review. We faced this assert during the CTU analysis of protobuf. We tried hard to synthesize a minimal test example both by hand and by executing creduce on multiple files. Unfortunately, we were unable to reduce to such a minimal example,

[PATCH] D38943: [ASTImporter] import SubStmt of CaseStmt

2018-03-27 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: cfe/trunk/unittests/AST/ASTImporterTest.cpp:100 + // This traverses the AST to catch certain bugs like poorly or not + // implemented subtrees. r.stahl wrote: > a.sidorin wrote: > > I just saw this change and I

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi Aleksei, I don't have commit permissions, could you please help and commit? Repository: rC Clang https://reviews.llvm.org/D43967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-30 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Ping. Could someone with commit rights please commit this? @szepet or @xazax.hun ? Repository: rC Clang https://reviews.llvm.org/D43967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-26 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 139791. martong added a comment. - Fix gcc 5 warnings Repository: rC Clang https://reviews.llvm.org/D43967 Files: unittests/AST/ASTImporterTest.cpp unittests/AST/DeclMatcher.h Index: unittests/AST/DeclMatcher.h

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-21 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:1169 + MatchVerifier Verifier; + ASSERT_TRUE(Verifier.match(From, cxxRecordDecl(has(fieldDecl(); + ASSERT_TRUE(Verifier.match(To, cxxRecordDecl(has(fieldDecl(); a.sidorin

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-23 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 139567. martong marked 3 inline comments as done. martong added a comment. - Add some minor changes based on xazax's comments Repository: rC Clang https://reviews.llvm.org/D43967 Files: unittests/AST/ASTImporterTest.cpp unittests/AST/DeclMatcher.h

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-23 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:276 +// This will not create the file more than once. +createVirtualFile(ToAST.get(), It->FileName, It->Code); + xazax.hun wrote: > Maybe an IfNeeded suffix or something like

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-21 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 139295. martong marked 7 inline comments as done. martong added a comment. Add minor syntax changes and rename Repository: rC Clang https://reviews.llvm.org/D43967 Files: unittests/AST/ASTImporterTest.cpp unittests/AST/DeclMatcher.h Index:

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-20 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:198 + Language ToLang, StringRef Identifier = "declToImport") { +ArgVector FromArgs = getBasicRunOptionsForLanguage(FromLang), + ToArgs =

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-20 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 139181. martong marked 14 inline comments as done. martong added a comment. Update based on Alexei's comments. - Use createVirtualFile in testImport - Add minimal style changes - Use DeclCounter - Add hasFieldOrder matcher - Add parameterized tests

[PATCH] D43967: Add test helper Fixture

2018-03-01 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a.sidorin, xazax.hun, szepet. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. [ASTImporter] Add a helper test Fixture, so we can add tests which may check internal attributes of AST nodes. Also it makes possible to import from

[PATCH] D43967: Add test helper Fixture

2018-03-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. We add several test cases here, some of them are disabled. We plan to pass the disabled tests in different patches. Repository: rC Clang https://reviews.llvm.org/D43967 ___ cfe-commits mailing list

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-05 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi Aleksei, I agree that there are some overlapping functionalities in the patches. As far as I see both make it possible to write tests which import from multiple contexts and I think that is the only redundant part. So, I agree, for now we could use both approaches

[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

2018-04-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:1556 + // Converting code texts into TUs + std::transform(Codes.begin(), Codes.end(), std::back_inserter(FromTUs), + [this](StringRef Code) { Instead of having 4

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

2018-06-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In https://reviews.llvm.org/D47698#1140629, @thakis wrote: > This code is live when reading pchs, correct? Does this have any measurable > perf impact on deserializing pchs for, say, Cocoa.h or Windows.h? No. The deserialization of a PCH is handled in a completely

[PATCH] D48773: [ASTImporter] Fix import of objects with anonymous types

2018-06-29 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a.sidorin, balazske, r.stahl. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. Currently, anonymous types are merged into the same redecl chain even if they are structurally inequivalent. This results that global objects are not

[PATCH] D47632: [ASTImporter] Refactor Decl creation

2018-06-29 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. I realized that, this patch brakes 3 lldb tests ATM: - `TestTopLevelExprs.py`. If https://reviews.llvm.org/D48722 was merged then this test would not be broken. - `TestPersistentTypes.py` If https://reviews.llvm.org/D48773 was merged then this test would not be broken.

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

2018-06-29 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL335959: [ASTImporter] Eliminated some unittest warnings. (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47459 Files:

[PATCH] D48631: [ASTImporter] Added import of CXXStdInitializerListExpr

2018-06-29 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL335968: [ASTImporter] Added import of CXXStdInitializerListExpr (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D48631

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

2018-10-24 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a_sidorin, balazske. Herald added subscribers: cfe-commits, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a reviewer: a.sidorin. The crux of the issue that is being fixed is that lookup could not find previous

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-10-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Ping. This is still not committed, however, essential for ctu analyse any C++ project. Aleksei, I am happy to commit it for you if you don't have time, just let me know. Repository: rC Clang https://reviews.llvm.org/D44100

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

2018-10-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. This is about to make `GetAlreadyImportedOrNull` to be a const function, as it should be naturally. This is a query function which should not initiate other imports. Repository: rC Clang https://reviews.llvm.org/D53755

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

2018-10-26 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. Herald added subscribers: cfe-commits, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. a_sidorin Repository: rC Clang https://reviews.llvm.org/D53755 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp

[PATCH] D53704: [ASTImporter] Import overrides before importing the rest of the chain

2018-10-29 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC345496: [ASTImporter] Import overrides before importing the rest of the chain (authored by martong, committed by ). Changed prior to commit: https://reviews.llvm.org/D53704?vs=171097=171471#toc

[PATCH] D53704: [ASTImporter] Import overrides before importing the rest of the chain

2018-10-29 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi Aleksei, Thanks for the review. Yes, we encountered the issue during the analysis of Xerces. Repository: rC Clang https://reviews.llvm.org/D53704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53693: [ASTImporter] Typedef import brings in the complete type

2018-10-29 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 171478. martong marked 2 inline comments as done. martong added a comment. - Move FromUT upper, add break Repository: rC Clang https://reviews.llvm.org/D53693 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index:

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-10-31 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi Davide, I'd like to draw your attention to an important relation of this patch to a bug in LLDB which manifests as incorrect vtable layouts for LLDB expression code. Please see the conversation started with this message:

[PATCH] D53697: [ASTImporter][Structural Eq] Check for isBeingDefined

2018-10-31 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC345760: [ASTImporter][Structural Eq] Check for isBeingDefined (authored by martong, committed by ). Changed prior to commit: https://reviews.llvm.org/D53697?vs=171723=171984#toc Repository: rC Clang

[PATCH] D53697: [ASTImporter][Structural Eq] Check for isBeingDefined

2018-11-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Herald added a reviewer: shafik. Shafik, Sorry for the inconvenience. Seems like the libcxx tests of lldb are automatically skipped on Linux, so it slipped through my test execution. Also, I did not receive any email from this build server about the build failure.

<    1   2   3   4   5   6   7   8   9   10   >