Page MenuHomePhabricator

balazske (Balázs Kéri)
Engineering

Projects

User does not belong to any projects.

User Details

User Since
May 23 2018, 7:08 AM (55 w, 4 d)

Recent Activity

Thu, Jun 6

balazske added a comment to D59934: Compare SourceLocations from different TUs by FileID.

Is it a better fix to change getMacroInfoForLocation?

static const MacroInfo *getMacroInfoForLocation(const Preprocessor &PP,
                                                const SourceManager &SM,
                                                const IdentifierInfo *II,
                                                SourceLocation Loc) {
Thu, Jun 6, 7:16 AM · Restricted Project

Mon, Jun 3

balazske added a comment to D59934: Compare SourceLocations from different TUs by FileID.

The following ASTImporterTest reproduces the assert:

TEST_P(ASTImporterOptionSpecificTestBase, SourceLocationDifferentTU) {
  TranslationUnitDecl *ToTU = getToTuDecl("void f1();", Lang_CXX11);
  Decl *FromTU = getTuDecl("void f2();", Lang_CXX11, "input.cc");
  auto *ToF1 = FirstDeclMatcher<FunctionDecl>().match(ToTU, functionDecl());
  auto *FromF2 = FirstDeclMatcher<FunctionDecl>().match(FromTU, functionDecl());
Mon, Jun 3, 3:43 AM · Restricted Project
balazske added a comment to D59934: Compare SourceLocations from different TUs by FileID.

The problem has not necessarily do something with macro expansion. If a function is imported in CTU mode and for any reason source locations inside it are compared against source locations in the original TU these locations are (from SourceManager point of view) in different TUs. But from TU point of view these are in the same TU because the AST import (AST import keeps the original filename and location in the new source location, so the new SourceLocation is in the same TU but different source file). Maybe this is a new case related to CTU mode in the compare function so it is correct to handle this case too (without assert).

Mon, Jun 3, 3:38 AM · Restricted Project

Fri, May 31

balazske added a comment to D60499: [ASTImporter] Various source location and range import fixes..

Added lit tests for the simple (Decl) cases. The Expr and type related changes are more tricky to do. But I do not like this approach to add new tests because the test function in D60463 does almost the same thing for every import in ASTTests without adding lot of new checks manually.

Fri, May 31, 8:04 AM · Restricted Project
balazske updated the diff for D60499: [ASTImporter] Various source location and range import fixes..
  • Import BraceRange of EnumDecl.
  • Added lit tests.
Fri, May 31, 7:59 AM · Restricted Project
balazske updated the diff for D60463: [ASTImporter] Add check for correct import of source locations..
  • Using size_t instead of int.
Fri, May 31, 4:16 AM · Restricted Project

Thu, May 30

balazske added a comment to D60463: [ASTImporter] Add check for correct import of source locations..

In the current state there are failing AST tests. This test can be added after the problems are fixed.

Thu, May 30, 8:12 AM · Restricted Project
balazske updated the diff for D60463: [ASTImporter] Add check for correct import of source locations..

New patch and check the first line of AST dump only.

Thu, May 30, 8:05 AM · Restricted Project
balazske added a comment to D60499: [ASTImporter] Various source location and range import fixes..

It looks like that the same test can be applied as in D60463 but check only the first line of the AST dump. The first line contains information about the actual Decl only. This checks less than checking the full AST dump but finds some of wrong SourceLocation import. The problem is that the test can not be added yet because there are other failures. At least one new patch is needed with corrections related to import of TypeSourceInfo. Anyway this change (and the others) can not be added together with the test because multiple patches (including this) are needed to make the test not fail.

Thu, May 30, 3:37 AM · Restricted Project

Wed, May 29

balazske added inline comments to D60499: [ASTImporter] Various source location and range import fixes..
Wed, May 29, 2:06 AM · Restricted Project
balazske added a comment to D60499: [ASTImporter] Various source location and range import fixes..

There is a test for the SourceLocation import in https://reviews.llvm.org/D60463 (after this patch is applied that test should not fail and the "return" statement is to be removed).

Wed, May 29, 12:32 AM · Restricted Project

Mon, May 27

balazske updated the diff for D60499: [ASTImporter] Various source location and range import fixes..
  • Import BraceRange of EnumDecl.
Mon, May 27, 6:31 AM · Restricted Project
Herald added a reviewer for D62484: [ASTImporter] Added visibility context check for EnumDecl.: a.sidorin.
Mon, May 27, 6:11 AM · Restricted Project
balazske committed rC361752: [ASTImporter] Added visibility context check for CXXRecordDecl..
[ASTImporter] Added visibility context check for CXXRecordDecl.
Mon, May 27, 2:36 AM
balazske committed rGc8272195cd2d: [ASTImporter] Added visibility context check for CXXRecordDecl. (authored by balazske).
[ASTImporter] Added visibility context check for CXXRecordDecl.
Mon, May 27, 2:36 AM
balazske committed rL361752: [ASTImporter] Added visibility context check for CXXRecordDecl..
[ASTImporter] Added visibility context check for CXXRecordDecl.
Mon, May 27, 2:36 AM
balazske closed D62312: [ASTImporter] Added visibility context check for CXXRecordDecl..
Mon, May 27, 2:36 AM · Restricted Project, Restricted Project

Fri, May 24

balazske updated the diff for D62312: [ASTImporter] Added visibility context check for CXXRecordDecl..
  • Changed type of string constants to const.
Fri, May 24, 1:00 AM · Restricted Project, Restricted Project
balazske added a comment to D62312: [ASTImporter] Added visibility context check for CXXRecordDecl..

Thanks for reviewing.

Fri, May 24, 12:11 AM · Restricted Project, Restricted Project

Thu, May 23

Herald added a reviewer for D62312: [ASTImporter] Added visibility context check for CXXRecordDecl.: a.sidorin.
Thu, May 23, 6:52 AM · Restricted Project, Restricted Project
balazske added a comment to D60465: [ASTImporter] Error handling fix in ImportDefinition_New..

Maybe this patch can be abandoned, the correction is already made (when every _New was removed).

Thu, May 23, 2:41 AM · Restricted Project
balazske added a comment to D60465: [ASTImporter] Error handling fix in ImportDefinition_New..

ping

Thu, May 23, 2:36 AM · Restricted Project
balazske updated the diff for D60465: [ASTImporter] Error handling fix in ImportDefinition_New..

Rebase to current master.

Thu, May 23, 2:33 AM · Restricted Project

May 7 2019

balazske committed rGb7d8cffa75a4: [ASTImporter] Corrected type of integer constant in a test. (authored by balazske).
[ASTImporter] Corrected type of integer constant in a test.
May 7 2019, 7:55 AM
balazske committed rL360156: [ASTImporter] Corrected type of integer constant in a test..
[ASTImporter] Corrected type of integer constant in a test.
May 7 2019, 7:50 AM
balazske committed rC360156: [ASTImporter] Corrected type of integer constant in a test..
[ASTImporter] Corrected type of integer constant in a test.
May 7 2019, 7:50 AM
balazske committed rG1efc97425df3: [ASTImporter] Import TemplateParameterLists in function templates. (authored by balazske).
[ASTImporter] Import TemplateParameterLists in function templates.
May 7 2019, 3:54 AM
balazske committed rL360132: [ASTImporter] Import TemplateParameterLists in function templates..
[ASTImporter] Import TemplateParameterLists in function templates.
May 7 2019, 3:54 AM
balazske committed rC360132: [ASTImporter] Import TemplateParameterLists in function templates..
[ASTImporter] Import TemplateParameterLists in function templates.
May 7 2019, 3:54 AM
balazske closed D60461: [ASTImporter] Import TemplateParameterLists in function templates..
May 7 2019, 3:54 AM · Restricted Project

May 6 2019

balazske added inline comments to D59537: Instantiate 'std' templates explicitly in the expression evaluator.
May 6 2019, 5:03 AM · Restricted Project, Restricted Project, Restricted Project

Apr 16 2019

balazske added inline comments to D41910: [Concepts] Constrained partial specializations and function overloads..
Apr 16 2019, 6:32 AM · Restricted Project
balazske added inline comments to D44352: [Concepts] Type Constraints.
Apr 16 2019, 3:41 AM · Restricted Project

Apr 10 2019

Herald added a reviewer for D60499: [ASTImporter] Various source location and range import fixes.: a.sidorin.
Apr 10 2019, 1:45 AM · Restricted Project
balazske added a comment to D60463: [ASTImporter] Add check for correct import of source locations..

This test will work theoretically only if the order of every imported Decl (and not only FieldDecl) is correct, this is not the case now. So probably a better solution for the problem should be found: Enumerate and match (the From and To) SourceLocations with AST visitor. There should be some existing code that is doing somewhat similar in clang-query but I did not find it.

Apr 10 2019, 12:55 AM · Restricted Project

Apr 9 2019

balazske updated the diff for D60465: [ASTImporter] Error handling fix in ImportDefinition_New..
  • Removed unneeded and wrong type cast.
Apr 9 2019, 8:11 AM · Restricted Project
Herald added a reviewer for D60465: [ASTImporter] Error handling fix in ImportDefinition_New.: a.sidorin.
Apr 9 2019, 7:58 AM · Restricted Project
Herald added a reviewer for D60463: [ASTImporter] Add check for correct import of source locations.: a.sidorin.
Apr 9 2019, 7:20 AM · Restricted Project
Herald added a reviewer for D60461: [ASTImporter] Import TemplateParameterLists in function templates.: a.sidorin.
Apr 9 2019, 6:37 AM · Restricted Project

Apr 8 2019

balazske committed rGa1f6b103f396: Changed every use of ASTImporter::Import to Import_New (authored by balazske).
Changed every use of ASTImporter::Import to Import_New
Apr 8 2019, 7:02 AM
balazske committed rL357913: Changed every use of ASTImporter::Import to Import_New.
Changed every use of ASTImporter::Import to Import_New
Apr 8 2019, 7:02 AM
balazske committed rC357913: Changed every use of ASTImporter::Import to Import_New.
Changed every use of ASTImporter::Import to Import_New
Apr 8 2019, 7:02 AM
balazske closed D55049: Changed every use of ASTImporter::Import to Import_New.
Apr 8 2019, 7:01 AM · Restricted Project

Mar 25 2019

balazske updated the diff for D55049: Changed every use of ASTImporter::Import to Import_New.

Corrected rebase problems.

Mar 25 2019, 8:12 AM · Restricted Project
balazske updated the diff for D55049: Changed every use of ASTImporter::Import to Import_New.
  • Rebase to current master.
  • Fixed error handling in testImport.
Mar 25 2019, 7:45 AM · Restricted Project
balazske added inline comments to D55049: Changed every use of ASTImporter::Import to Import_New.
Mar 25 2019, 2:21 AM · Restricted Project
balazske committed rG57949eb6772d: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter. (authored by balazske).
[ASTImporter] Changed use of Import to Import_New in ASTNodeImporter.
Mar 25 2019, 2:16 AM
balazske committed rC356874: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter..
[ASTImporter] Changed use of Import to Import_New in ASTNodeImporter.
Mar 25 2019, 2:15 AM
balazske committed rL356874: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter..
[ASTImporter] Changed use of Import to Import_New in ASTNodeImporter.
Mar 25 2019, 2:15 AM
balazske closed D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter..
Mar 25 2019, 2:15 AM · Restricted Project, Restricted Project
balazske added inline comments to D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter..
Mar 25 2019, 12:29 AM · Restricted Project, Restricted Project

Mar 22 2019

balazske added inline comments to D59485: [ASTImporter] Add an ImportImpl method to allow customizing Import behavior..
Mar 22 2019, 8:27 AM · Restricted Project
balazske added inline comments to D59537: Instantiate 'std' templates explicitly in the expression evaluator.
Mar 22 2019, 4:59 AM · Restricted Project, Restricted Project, Restricted Project
balazske added inline comments to D59537: Instantiate 'std' templates explicitly in the expression evaluator.
Mar 22 2019, 2:45 AM · Restricted Project, Restricted Project, Restricted Project
balazske added inline comments to D59485: [ASTImporter] Add an ImportImpl method to allow customizing Import behavior..
Mar 22 2019, 1:44 AM · Restricted Project

Mar 20 2019

balazske committed rGdec0916f33eb: [ASTImporter] Remove obsolete function ImportTemplateParameterList. (authored by balazske).
[ASTImporter] Remove obsolete function ImportTemplateParameterList.
Mar 20 2019, 8:42 AM
balazske committed rC356564: [ASTImporter] Remove obsolete function ImportTemplateParameterList..
[ASTImporter] Remove obsolete function ImportTemplateParameterList.
Mar 20 2019, 8:41 AM
balazske committed rL356564: [ASTImporter] Remove obsolete function ImportTemplateParameterList..
[ASTImporter] Remove obsolete function ImportTemplateParameterList.
Mar 20 2019, 8:41 AM
balazske closed D59134: [ASTImporter] Remove obsolete function ImportTemplateParameterList..
Mar 20 2019, 8:41 AM · Restricted Project, Restricted Project
balazske accepted D59595: Remove the unused return value in ASTImporter::Imported [NFC].

I would prefer an observer-like solution but I am not against this change.

Mar 20 2019, 5:23 AM · Restricted Project, Restricted Project

Mar 19 2019

balazske added inline comments to D59537: Instantiate 'std' templates explicitly in the expression evaluator.
Mar 19 2019, 4:39 AM · Restricted Project, Restricted Project, Restricted Project
balazske added a comment to D59485: [ASTImporter] Add an ImportImpl method to allow customizing Import behavior..

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 must be performed, maybe that function can be made public somehow.

Mar 19 2019, 3:36 AM · Restricted Project
balazske added a comment to D59485: [ASTImporter] Add an ImportImpl method to allow customizing Import behavior..

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 Decl is handled by the strategy, and Import is called only if yes and Import can return an Expected<Decl *>. (The PostImport is called for every successfully imported Decl.)

Mar 19 2019, 3:32 AM · Restricted Project
balazske added a comment to D59485: [ASTImporter] Add an ImportImpl method to allow customizing Import behavior..

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 ASTImporter user code.)

Mar 19 2019, 2:05 AM · Restricted Project

Mar 18 2019

balazske added a comment to D59485: [ASTImporter] Add an ImportImpl method to allow customizing Import behavior..

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 must be made public, for example map of imported decls and lookup table. The shim may corrupt the ASTImporter state for example when the lookup table is not updated correctly. (Probably for the LLDB special use cases this is not a problem?)

Mar 18 2019, 6:34 AM · Restricted Project
balazske added a comment to D59485: [ASTImporter] Add an ImportImpl method to allow customizing Import behavior..

I do not know if "Shim" is the correct name for this, maybe "Strategy" is better?

Mar 18 2019, 6:22 AM · Restricted Project

Mar 14 2019

balazske committed rG5f4fd8b79bf6: [ASTImporter] Fix import of NestedNameSpecifierLoc. (authored by balazske).
[ASTImporter] Fix import of NestedNameSpecifierLoc.
Mar 14 2019, 7:21 AM
balazske committed rC356151: [ASTImporter] Fix import of NestedNameSpecifierLoc..
[ASTImporter] Fix import of NestedNameSpecifierLoc.
Mar 14 2019, 7:21 AM
balazske committed rL356151: [ASTImporter] Fix import of NestedNameSpecifierLoc..
[ASTImporter] Fix import of NestedNameSpecifierLoc.
Mar 14 2019, 7:20 AM
balazske closed D55358: [ASTImporter] Fix import of NestedNameSpecifierLoc..
Mar 14 2019, 7:20 AM · Restricted Project, Restricted Project

Mar 11 2019

balazske updated the diff for D55358: [ASTImporter] Fix import of NestedNameSpecifierLoc..

Rebase.

Mar 11 2019, 3:01 AM · Restricted Project, Restricted Project

Mar 8 2019

Herald added a reviewer for D59134: [ASTImporter] Remove obsolete function ImportTemplateParameterList.: a.sidorin.
Mar 8 2019, 6:55 AM · Restricted Project, Restricted Project
balazske added a comment to D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter..

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 templates are used). The next part is D55049 which switches to Import_New in every other place (in clang source code only). Next part would be to use Import_New in lldb, then rename all Import_New to Import (and remove old Import).

Mar 8 2019, 1:25 AM · Restricted Project, Restricted Project
balazske updated the diff for D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter..

Rebase (old patch applied without changes).

Mar 8 2019, 1:17 AM · Restricted Project, Restricted Project

Mar 7 2019

balazske committed rGe2ddb2ad1d84: [ASTImporter] Changed use of Import to Import_New in ASTImporter. (authored by balazske).
[ASTImporter] Changed use of Import to Import_New in ASTImporter.
Mar 7 2019, 6:09 AM
balazske committed rL355598: [ASTImporter] Changed use of Import to Import_New in ASTImporter..
[ASTImporter] Changed use of Import to Import_New in ASTImporter.
Mar 7 2019, 6:09 AM
balazske committed rC355598: [ASTImporter] Changed use of Import to Import_New in ASTImporter..
[ASTImporter] Changed use of Import to Import_New in ASTImporter.
Mar 7 2019, 6:08 AM
balazske closed D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter..
Mar 7 2019, 6:08 AM · Restricted Project
balazske updated the diff for D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter..
  • Small style corrections.
Mar 7 2019, 5:15 AM · Restricted Project

Mar 1 2019

balazske added a comment to D58743: Handle built-in when importing SourceLocation and FileID .

Looks good now.

Mar 1 2019, 1:44 AM · Restricted Project

Feb 28 2019

balazske added inline comments to D58743: Handle built-in when importing SourceLocation and FileID .
Feb 28 2019, 6:11 AM · Restricted Project

Feb 27 2019

balazske committed rG9cf39dfb3857: [ASTImporter] Improve import of FileID. (authored by balazske).
[ASTImporter] Improve import of FileID.
Feb 27 2019, 8:32 AM
balazske committed rL355000: [ASTImporter] Improve import of FileID..
[ASTImporter] Improve import of FileID.
Feb 27 2019, 8:32 AM
balazske committed rC355000: [ASTImporter] Improve import of FileID..
[ASTImporter] Improve import of FileID.
Feb 27 2019, 8:32 AM
balazske closed D57590: [ASTImporter] Improve import of FileID..
Feb 27 2019, 8:32 AM · Restricted Project
balazske added a comment to D57590: [ASTImporter] Improve import of FileID..

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.

Feb 27 2019, 3:41 AM · Restricted Project

Feb 5 2019

balazske added inline comments to D57740: [ASTImporter] Import every Decl in lambda record.
Feb 5 2019, 6:54 AM · Restricted Project, Restricted Project
balazske added a parent revision for D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.: D57590: [ASTImporter] Improve import of FileID..
Feb 5 2019, 12:07 AM · Restricted Project
balazske added a child revision for D57590: [ASTImporter] Improve import of FileID.: D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter..
Feb 5 2019, 12:07 AM · Restricted Project

Feb 1 2019

balazske added a comment to D57590: [ASTImporter] Improve import of FileID..

This change is needed for D53818 to make LLDB tests pass.

Feb 1 2019, 8:31 AM · Restricted Project
balazske created D57590: [ASTImporter] Improve import of FileID..
Feb 1 2019, 8:09 AM · Restricted Project

Jan 28 2019

balazske added inline comments to D57322: [ASTImporter] Refactor unittests to be able to parameterize them in a more flexible way.
Jan 28 2019, 5:44 AM · Restricted Project

Jan 25 2019

balazske added inline comments to D57232: [ASTImporter] Check visibility/linkage of functions and variables.
Jan 25 2019, 9:02 AM · Restricted Project, Restricted Project
balazske added inline comments to D56936: Fix handling of overriden methods during ASTImport.
Jan 25 2019, 1:49 AM

Jan 24 2019

balazske added inline comments to D56936: Fix handling of overriden methods during ASTImport.
Jan 24 2019, 12:05 AM

Jan 23 2019

balazske added a comment to D56936: Fix handling of overriden methods during ASTImport.

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 for already existing ParmVarDecl (not already imported) and return if found.

Jan 23 2019, 12:00 AM

Jan 22 2019

balazske updated the diff for D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter..
  • Small style corrections.
Jan 22 2019, 2:05 AM · Restricted Project

Jan 21 2019

balazske added inline comments to D56936: Fix handling of overriden methods during ASTImport.
Jan 21 2019, 12:20 AM

Dec 21 2018

balazske updated the diff for D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter..

Rebase.

Dec 21 2018, 1:36 AM · Restricted Project

Dec 6 2018

balazske created D55358: [ASTImporter] Fix import of NestedNameSpecifierLoc..
Dec 6 2018, 2:03 AM · Restricted Project, Restricted Project