[PATCH] D64801: [analyzer] Add CTU user docs

2019-07-16 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: dkrupp, a_sidorin, Szelethus, NoQ. Herald added subscribers: cfe-commits, Charusso, gamesh411, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, whisperity. Herald added a project: clang. Repository:

[PATCH] D64554: [CrossTU] Add a function to retrieve original source location.

2019-07-16 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: include/clang/AST/ASTImporter.h:317 +std::shared_ptr SharedState = nullptr, +ASTUnit *Unit = nullptr); martong wrote: > balazske wrote: > > balazske wrote: > > > martong wrote: > > > >

[PATCH] D64554: [CrossTU] Add a function to retrieve original source location.

2019-07-16 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: include/clang/AST/ASTImporter.h:317 +std::shared_ptr SharedState = nullptr, +ASTUnit *Unit = nullptr); balazske wrote: > balazske wrote: > > martong wrote: > > > What if we provided an

[PATCH] D64554: [CrossTU] Add a function to retrieve original source location.

2019-07-16 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: include/clang/AST/ASTImporter.h:317 +std::shared_ptr SharedState = nullptr, +ASTUnit *Unit = nullptr); What if we provided an additional constructor where we take over the ASTUnits

[PATCH] D64753: [CrossTU][NFCI] Refactor loadExternalAST function

2019-07-16 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Thank you Endre, this patch is a great initiative. However, I think we can do better encapsulation then just the reorganization of the functions: We could encapsulate into a nested class `NameASTUnitMap` and the functions which operate on this

[PATCH] D64554: [CrossTU] Add a function to retrieve original source location.

2019-07-16 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: include/clang/AST/ASTImporter.h:234 +/// The ASTUnit that this importer belongs to, if any. +ASTUnit *Unit; + `Unit->getASTContext` must be equal to `FromContext`, right? Then `FromUnit` would be a better

[PATCH] D61333: [ASTImporter] Fix LLDB lookup in transparent ctx and with ext src

2019-07-15 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D61333#1583173 , @teemperor wrote: > @martong Sorry for the delay, feel free to ping me in the future about these > patches. I'll review them ASAP now that I'm back in office, so these delay's > hopefully won't happen again.

[PATCH] D61333: [ASTImporter] Fix LLDB lookup in transparent ctx and with ext src

2019-07-15 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 209832. martong added a comment. - Rebase to master Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61333/new/ https://reviews.llvm.org/D61333 Files: clang/lib/AST/ASTImporter.cpp

[PATCH] D64477: [ASTImporter] Using Lang_CXX14 in ASTImporterVisibilityTest.

2019-07-15 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D64477#1585218 , @balazske wrote: > In D64477#1585092 , @martong wrote: > > > Does it really matter if it is CXX11 or CXX14, in the child patch we use a > > CXX11 using directive.

[PATCH] D64477: [ASTImporter] Using Lang_CXX14 in ASTImporterVisibilityTest.

2019-07-15 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. Does it really matter if it is CXX11 or CXX14, in the child patch we use a CXX11 using directive. Anyway, CXX14 is more future proof. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64477/new/

[PATCH] D64628: [CrossTU] Test change only: improve ctu-main.c

2019-07-15 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D64628#1584969 , @balazske wrote: > The mentioned commit has a test that reproduces the same problem, so this > revision is not needed (abandon it?). I think we should have this change, because it tests also if we can import

[PATCH] D61333: [ASTImporter] Fix LLDB lookup in transparent ctx and with ext src

2019-07-12 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @shafik @jingham This is a polite Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61333/new/ https://reviews.llvm.org/D61333 ___ cfe-commits mailing list

[PATCH] D64554: [CrossTU] Add a function to retrieve original source location.

2019-07-12 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > This patch can be treated as part of a bigger change that is needed to > improve macro expansion handliong at plist generation. @balazske Could you please prepare the upcoming patch and put that on the Stack. I think that may ease the work of the reviewers if they

[PATCH] D64494: [analyzer]Add user docs rst

2019-07-10 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > In any case, LGTM, if this really is a beginning of porting the already > existing documentation to sphinx. This is really the beginning of porting the existing docs to sphinx which is supposedly going to be done by @dkrupp. And I am planning to add new user manual

[PATCH] D64494: [analyzer]Add user docs rst

2019-07-10 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365639: [analyzer]Add user docs rst (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D64494: [analyzer]Add user docs rst

2019-07-10 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D64494#1578373 , @dkrupp wrote: > I guess this is a placeholder for the subpages of "User Manual" @ > https://clang-analyzer.llvm.org, which will be ported in follow-up patches. Yes. Repository: rG LLVM Github Monorepo

[PATCH] D64494: [analyzer]Add user docs rst

2019-07-10 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added a reviewer: dkrupp. Herald added subscribers: cfe-commits, Charusso, gamesh411, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, whisperity. Herald added a project: clang. Add user documentation

[PATCH] D64075: [ASTImporter] Fix structural eq of lambdas

2019-07-09 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D64075#1572676 , @a_sidorin wrote: > Hi Gabor, > The patch looks good, but it looks to me that it has a relation to > https://reviews.llvm.org/D64078 that is kind of questionable to me. Let's > delay landing this patch until

[PATCH] D64075: [ASTImporter] Fix structural eq of lambdas

2019-07-09 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 208727. martong added a comment. Herald added a reviewer: shafik. - Add test which crashes in baseline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64075/new/ https://reviews.llvm.org/D64075 Files:

[PATCH] D64073: [ASTImporter] Fix import of lambda in function param

2019-07-08 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365315: [ASTImporter] Fix import of lambda in function param (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63640: [clang] Improve Serialization/Imporing of APValues

2019-07-05 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:8503 +llvm::Expected ASTImporter::Import(const APValue ) { + APValue Result; Tyker wrote: > martong wrote: > > Tyker wrote: > > > martong wrote: > > > > Looks okay, but could we have

[PATCH] D64241: [ASTImporter] Fix inequivalence of ClassTemplateInstantiations

2019-07-05 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added a reviewer: a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a project: clang. We falsely state inequivalence if the template parameter is a

[PATCH] D63920: [CTU] Add support for virtual functions

2019-07-04 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365133: [CTU] Add support for virtual functions (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63920: [CTU] Add support for virtual functions

2019-07-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63920/new/ https://reviews.llvm.org/D63920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63920: [CTU] Add support for virtual functions

2019-07-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 208002. martong added a comment. - Remove ipa mode from the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63920/new/ https://reviews.llvm.org/D63920 Files: clang/lib/StaticAnalyzer/Core/CallEvent.cpp

[PATCH] D62960: Add SVE opaque built-in types

2019-07-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. The ASTImporter and the test for it looks good to me, thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62960/new/ https://reviews.llvm.org/D62960 ___ cfe-commits mailing list

[PATCH] D63640: [clang] Improve Serialization/Imporing of APValues

2019-07-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/include/clang/AST/ASTImporter.h:331 +/// +/// \return the equivalent APValue in the "from" Constext or the import +/// error. martong wrote: > typo: `Constext` -> `Context` > Also, we return with the

[PATCH] D62329: [ASTImporter] Structural eq: handle DependentScopeDeclRefExpr

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: cfe/trunk/lib/AST/ASTStructuralEquivalence.cpp:173 +DE2->getQualifier()); + } else if (auto CastE1 = dyn_cast(E1)) { +auto *CastE2 = dyn_cast(E2);

[PATCH] D64073: [ASTImporter] Fix import of lambda in function param

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 207776. martong marked an inline comment as done. martong added a comment. - 'the ' -> 'the ' - Use std::distance() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64073/new/ https://reviews.llvm.org/D64073

[PATCH] D64073: [ASTImporter] Fix import of lambda in function param

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added a comment. Thanks for the review Alexei! Comment at: clang/unittests/AST/ASTImporterTest.cpp:5103 + // count. + for (auto : ToL->decls()) { +(void)D; a_sidorin wrote: > Can we use std::distance

[PATCH] D64075: [ASTImporter] Fix structural eq of lambdas

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 207774. martong marked an inline comment as done. martong added a comment. - Add check for isLambda() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64075/new/ https://reviews.llvm.org/D64075 Files:

[PATCH] D64075: [ASTImporter] Fix structural eq of lambdas

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTStructuralEquivalence.cpp:1182 + if (D1CXX->isLambda()) { +if (!D2CXX->isLambda()) a_sidorin wrote: > Should we return false if

[PATCH] D63920: [CTU] Add support for virtual functions

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D63920#1568049 , @Szelethus wrote: > In D63920#1568031 , @martong wrote: > > > In D63920#1566035 , > > @baloghadamsoftware wrote: > > > > > Try

[PATCH] D59798: [analyzer] Add analyzer option to limit the number of imported TUs

2019-07-03 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: include/clang/StaticAnalyzer/Core/AnalyzerOptions.def:297 +"for import when inlining functions during CTU analysis. " +

[PATCH] D63920: [CTU] Add support for virtual functions

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 207738. martong added a comment. - Use -analyzer-config ipa=inlining in the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63920/new/ https://reviews.llvm.org/D63920 Files:

[PATCH] D63920: [CTU] Add support for virtual functions

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D63920#1566035 , @baloghadamsoftware wrote: > Try to set analyzer option `IPAMode` to something different from its default > value which is `dynamic-bifurcate` in the test file. Ok I set it to `ipa=inlining` and then we

[PATCH] D64078: [ASTImporter] Fix structural ineq of lambdas with different sloc

2019-07-02 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added a reviewer: a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. Currently we do not differentiate lambda classes

[PATCH] D64075: [ASTImporter] Fix structural eq of lambdas

2019-07-02 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added a reviewer: a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a project: clang. The structural equivalence check reported false eq between lambda classes with

[PATCH] D64073: [ASTImporter] Fix import of lambda in function param

2019-07-02 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added a reviewer: a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. The current import implementation fails to import

[PATCH] D62329: [ASTImporter] Structural eq: handle DependentScopeDeclRefExpr

2019-07-02 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364889: [ASTImporter] Structural eq: handle DependentScopeDeclRefExpr (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Jenkins had one unrelated failure at http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/29812/ Test Result (1 failure / +1) LLDB.Reproducer.TestGDBRemoteRepro.test After that the next build is green:

[PATCH] D62329: [ASTImporter] Structural eq: handle DependentScopeDeclRefExpr

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 207354. martong added a comment. - Handle ImplicitCastExpr. In Clang7 in the last two test cases we did not have any ImplicitCastExpr in the AST. With never Clang we have, so we must handle the cast expr too. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @shafik I've been looking for any lldb regression in our Mac machine, could not find any. Now I am looking at http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/ . I don't expect regression because here we changed logic about the error handling only, so I'd

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364785: [ASTImporter] Mark erroneous nodes in shared st (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Jenkins is green: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/29809/ Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62375/new/ https://reviews.llvm.org/D62375 ___ cfe-commits

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @shafik I've been looking for any lldb regression in our Mac machine, could not find any. Now I am looking at http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/ . I don't expect regression because here we changed logic about the error handling only, so I'd

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364771: [ASTImporter] Mark erroneous nodes in from ctx (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63640: [clang] Improve Serialization/Imporing of APValues

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Comment at: clang/include/clang/AST/ASTImporter.h:331 +/// +/// \return the equivalent APValue in the "from" Constext or the import +/// error. typo: `Constext` -> `Context` Also, we return with the APValue in the "to"

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 207288. martong marked an inline comment as done. martong added a comment. - Move ImportPathTy's funcitons in-class, add class comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62375/new/

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Jenkins is green: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/29802/ Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63603/new/ https://reviews.llvm.org/D63603 ___ cfe-commits

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added a comment. > Thank you for the explanation. I got the idea of this patch anyway, but it > will be definitely useful for anyone digging into the code. Should we make it > a comment for ImportPathTy? Ok, I have added the explanation to

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @shafik I've been looking for any lldb regression in our Mac machine, could not find any. Now I am looking at http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/ . I don't expect regression because here we changed logic about the error handling only, so I'd

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364752: [ASTImporter] Propagate error from ImportDeclContext (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D62131: [ASTImporter] Remove NonEquivalentDecls from ASTImporter

2019-06-28 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added a comment. In D62131#1517634 , @a_sidorin wrote: > Hi Gabor, > Could you provide an example of an import sequence leading to this behavior? > It's hard for me to imagine such a situation. Alexei,

[PATCH] D62329: [ASTImporter] Structural eq: handle DependentScopeDeclRefExpr

2019-06-28 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Alexei, thank you very much for the review, you caught quite a few missing things! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62329/new/ https://reviews.llvm.org/D62329

[PATCH] D62329: [ASTImporter] Structural eq: handle DependentScopeDeclRefExpr

2019-06-28 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 8 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTStructuralEquivalence.cpp:124 + case DeclarationName::CXXConversionFunctionName: +return true; + a_sidorin wrote: > Should we check the equivalence of

[PATCH] D62329: [ASTImporter] Structural eq: handle DependentScopeDeclRefExpr

2019-06-28 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 207063. martong marked 4 inline comments as done. martong added a comment. - Add further checks for the DeclarationName overload Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62329/new/

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-06-28 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @a_sidorin Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63603/new/ https://reviews.llvm.org/D63603 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63920: [CTU] Add support for virtual functions

2019-06-28 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: clang/test/Analysis/ctu-main.cpp:112 + // We cannot decide about the dynamic type. + clang_analyzer_eval(obj->fvcl(1) == 8); // expected-warning{{FALSE}} expected-warning{{TRUE}} +

[PATCH] D63920: [CTU] Add support for virtual functions

2019-06-28 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: Szelethus, xazax.hun. Herald added subscribers: cfe-commits, gamesh411, dkrupp, rnkovacs. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63920 Files:

[PATCH] D63878: [CTU] Add missing statistics

2019-06-28 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364630: [CTU] Add missing statistics (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63878: [CTU] Add missing statistics

2019-06-27 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added a reviewer: xazax.hun. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63878 Files:

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-06-25 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 7 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7867 if (PosF != ImportedFromDecls.end()) { -if (LookupTable) +if (SharedState->getLookupTable()) if (auto *ToND = dyn_cast(ToD))

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-06-25 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206441. martong marked an inline comment as done. martong added a comment. - Encapsulate by adding addDeclToLookup and removeDeclFromLookup to the shared state Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-06-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added a reviewer: balazske. martong marked 6 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7830 if (ToD) { +// Already imported (possibly from another TU) and with an error. +if (auto Error =

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-06-25 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206431. martong added a comment. - Set error for FromD if it maps to an existing Decl which has an error set Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62376/new/ https://reviews.llvm.org/D62376 Files:

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-06-25 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206429. martong added a comment. - Add FIXMEs - Set error for FromD if it maps to an existing Decl which has an error set - Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62376/new/

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-25 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:5000 EXPECT_TRUE(ImportedOK); } balazske wrote: > I see now that this test is really not required, the previous test checks the >

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/29310/ is green. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62373/new/ https://reviews.llvm.org/D62373 ___ cfe-commits mailing list

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-25 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364279: [ASTImporter] Store import errors for Decls (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-25 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added a comment. @shafik I've been looking for any lldb regression in our Mac machine, could not find any. Now I am looking at http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/ . I don't expect regression because here we changed logic

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:8668 + +bool ASTImporter::ImportPathTy::hasCycleAtBack() { + return Aux[Nodes.back()] > 1; a_sidorin wrote: > const? Thanks! I made to be const. Comment at:

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7892 -// Error encountered for the first time. -assert(!getImportDeclErrorIfAny(FromD) && We may set up an error multiple times now, but

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206254. martong marked 5 inline comments as done. martong added a comment. - Use make_scope_exit - Make hasCycleAtBack const Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62375/new/

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206250. martong marked 2 inline comments as done. martong added a comment. - Use make_scope_exit - Add test ErrorIsNotPropagatedFromMemberToNamespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63603/new/

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 4 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:1724 + }; + DefinitionCompleter CompleterRAII(To); jkorous wrote: > You might consider using just a lambda with `llvm::make_scope_exit`. > >

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:8647 - assert(ImportDeclErrors.find(From) == ImportDeclErrors.end() && - "Setting import error allowed only once for a Decl."); ImportDeclErrors[From] =

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206244. martong added a comment. - Add back an assertion in setImportDeclError(), remove the condition in Import() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62375/new/ https://reviews.llvm.org/D62375

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206228. martong added a comment. - Remove the macro and use std::string.op+ - We may set up an error twice in case of a cycle, thus remove the assert Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62375/new/

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206223. martong added a comment. - Remove the macro and use std::string.op+ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63603/new/ https://reviews.llvm.org/D63603 Files: clang/lib/AST/ASTImporter.cpp

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 4 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7851 +if (!getImportDeclErrorIfAny(FromD)) { + // Error encountered for the first time. + // After takeError the error is not usable any more in

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206218. martong marked 2 inline comments as done. martong added a comment. - Assert that we set the error only once - Remove the macro and use std::string.op+ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 4 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7851 +if (!getImportDeclErrorIfAny(FromD)) { + // Error encountered for the first time. + // After takeError the error is not usable any more in

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Alexei, I think I still owe you some explanation about this patch. I do consider this patch as one of the most intricate patches regarding ASTImporter. I'd like to answer the following questions in this comment: What is an ImportPath and why do we need to track it? What

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-06-21 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Alexei, Thanks for the review! I have provided test cases for the 3 previous patches on which this one depends on. I will provide additional tests next week for this one, and of course will address the other comments. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-21 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Alexei, Thank you for the review, I have added a test which demonstrates the changes. By tracking the import paths and cycles we implement a very strict error handling mechanism, but this seems to be the way to avoid reaching any faulty AST nodes for the ASTImporter

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-21 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206022. martong added a comment. - Add test ErrorPropagatesThroughImportCycles - Change existing test to new behaviour Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62375/new/ https://reviews.llvm.org/D62375

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-21 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206020. martong added a comment. - Remove unused include and using Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62373/new/ https://reviews.llvm.org/D62373 Files: clang/include/clang/AST/ASTImporter.h

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-06-21 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206018. martong added a comment. - Remove formatv b/c it can't handle braces in code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63603/new/ https://reviews.llvm.org/D63603 Files:

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-21 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206017. martong added a comment. - Remove formatv b/c it can't handle braces in code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62373/new/ https://reviews.llvm.org/D62373 Files:

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-20 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:5109 } else { // ODR violation. // FIXME HandleNameConflict + return make_error(ImportError::NameConflict); a_sidorin wrote: > Is

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-20 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 205814. martong marked an inline comment as done. martong added a comment. - Remove unrelated change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62373/new/ https://reviews.llvm.org/D62373 Files:

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-20 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 205811. martong marked 3 inline comments as done. martong added a comment. - Test error values are set for AST nodes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62373/new/ https://reviews.llvm.org/D62373

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-06-20 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added a reviewer: a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. martong added a parent revision: D62373:

[PATCH] D61333: [ASTImporter] Fix LLDB lookup in transparent ctx and with ext src

2019-06-17 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. About the regression of TestFormatters.py: I realized that the problem is about the wrong implementation of the ExternalASTSource interface. In the implementation of FindExternalLexicalDecls of this interface, we simply ignored those cases when the given predicate

[PATCH] D61333: [ASTImporter] Fix LLDB lookup in transparent ctx and with ext src

2019-06-17 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 205093. martong added a comment. - Fix regression of TestFormatters.py Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61333/new/ https://reviews.llvm.org/D61333 Files: clang/lib/AST/ASTImporter.cpp

[PATCH] D62064: [ASTImporter] Fix unhandled cases in ASTImporterLookupTable

2019-06-11 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363062: [ASTImporter] Fix unhandled cases in ASTImporterLookupTable (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D62064: [ASTImporter] Fix unhandled cases in ASTImporterLookupTable

2019-06-11 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 204048. martong marked an inline comment as done. martong added a comment. - Simplify getRecordDeclOfFriend Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62064/new/ https://reviews.llvm.org/D62064 Files:

[PATCH] D62064: [ASTImporter] Fix unhandled cases in ASTImporterLookupTable

2019-06-11 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:4259 static const RecordDecl * getRecordDeclOfFriend(FriendDecl *FD) { QualType Ty = FD->getFriendType()->getType(); + if (auto *Inner =

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-05-24 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added a reviewer: a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. This is the third step of the full error handling.

  1   2   3   4   5   6   7   >