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

2019-03-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:3418 - for (const auto *Attr : D->attrs()) -ToIndirectField->addAttr(Importer.Import(Attr)); a_sidorin wrote: > shafik wrote: > > Why is this sec

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

2019-03-25 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356874: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL

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

2019-03-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:8550 +if (ExpectedType ToFromOrErr = Import_New(From)) { + if (ToContext.hasSameType(*ToFromOrErr, To)) +return true; a_sidorin wrote:

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

2019-03-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 192105. balazske added a comment. - Rebase to current master. - Fixed error handling in testImport. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55049/new/ https://reviews.llvm.org/D55049 Files: lib/AST/ASTImporter.cpp

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

2019-03-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 192110. balazske added a comment. Corrected rebase problems. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55049/new/ https://reviews.llvm.org/D55049 Files: lib/AST/ASTImporter.cpp lib/AST/ExternalASTMerger.cpp lib/Cr

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

2019-04-08 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC357913: Changed every use of ASTImporter::Import to Import_New (authored by balazske, committed by ). Changed prior to commit: https://reviews.llvm.org/D55049?vs=192110&id=194140#toc Repository: rC C

[PATCH] D60461: [ASTImporter] Import TemplateParameterLists in function templates.

2019-04-09 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. Correct missing import of TemplateParameterList in function dec

[PATCH] D60463: [ASTImporter] Add check for correct import of source locations.

2019-04-09 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. Unit tests extended with a new check for source locations. Curr

[PATCH] D60465: [ASTImporter] Error handling fix in ImportDefinition_New.

2019-04-09 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. ASTImporter::ImportDefinition_New contained a call to Import th

[PATCH] D60465: [ASTImporter] Error handling fix in ImportDefinition_New.

2019-04-09 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 194333. balazske added a comment. - Removed unneeded and wrong type cast. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60465/new/ https://reviews.llvm.org/D60465 Files: lib/AST/ASTImporter.cpp Index: lib/AST/ASTImporte

[PATCH] D60463: [ASTImporter] Add check for correct import of source locations.

2019-04-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. 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 visit

[PATCH] D60499: [ASTImporter] Various source location and range import fixes.

2019-04-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. ASTImporter contained wrong or missing imports of SourceLocatio

[PATCH] D44352: [Concepts] Constrained template parameters

2019-04-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:3708 + if (Expr *CE = D->getConstraintExpression()) +R->setConstraintExpression(VisitExpr(CE)); + return R; martong wrote: > Please use the `import` function instead of `VisitExpr`. Calling

[PATCH] D41910: [Concepts] Constrained partial specializations and function overloads.

2019-04-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:5096 +if (!ClassTemplate->findPartialSpecialization(TemplateArgs, +PartSpec->getAssociatedConstraints(), InsertPos)) // Add this partial specialization to the class template. --

[PATCH] D60461: [ASTImporter] Import TemplateParameterLists in function templates.

2019-05-07 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC360132: [ASTImporter] Import TemplateParameterLists in function templates. (authored by balazske, committed by ). Changed prior to commit: https://reviews.llvm.org/D60461?vs=194310&id=198431#toc Reposi

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

2018-09-17 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Hi, Did you mean to split the review only or the patches? It is not trivial how to make incremental patches for this change, every part is connected to the other. The import functions for a type (`Decl` or `Stmt`) call imports of other types (`Expr` for example) too. If

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

2018-10-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:194 + // FIXME: This should be the final code. + //auto ToOrErr = Importer.Import(From); + //if (ToOrErr) { a_sidorin wrote: > Do I understand correctly that we have to use the upp

[PATCH] D57740: [ASTImporter] Import every Decl in lambda record

2019-02-05 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:2432 + EXPECT_TRUE(ToD); + Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl(); + CXXRecordDecl *LambdaRec = Actually the `ToTU` is not needed, this line can be removed. R

[PATCH] D60499: [ASTImporter] Various source location and range import fixes.

2019-05-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. 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

[PATCH] D60463: [ASTImporter] Add check for correct import of source locations.

2019-05-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 202197. balazske added a comment. New patch and check the first line of AST dump only. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60463/new/ https://reviews.llvm.org/D60463 Files: unittests/AST/ASTImporterFixtures.cpp

[PATCH] D60463: [ASTImporter] Add check for correct import of source locations.

2019-05-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. In the current state there are failing AST tests. This test can be added after the problems are fixed. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60463/new/ https://reviews.llvm.org/D60463 _

[PATCH] D60463: [ASTImporter] Add check for correct import of source locations.

2019-05-31 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 202414. balazske added a comment. - Using size_t instead of int. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60463/new/ https://reviews.llvm.org/D60463 Files: unittests/AST/ASTImporterFixtures.cpp unittests/AST/ASTImp

[PATCH] D60499: [ASTImporter] Various source location and range import fixes.

2019-05-31 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 202438. balazske added a comment. - Import BraceRange of EnumDecl. - Added lit tests. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60499/new/ https://reviews.llvm.org/D60499 Files: lib/AST/ASTImporter.cpp test/Import/e

[PATCH] D60499: [ASTImporter] Various source location and range import fixes.

2019-05-31 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. 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

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-06-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. 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 d

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-06-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. 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"); au

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-06-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Is it a better fix to change getMacroInfoForLocation? static const MacroInfo *getMacroInfoForLocation(const Preprocessor &PP, const SourceManager &SM, const IdentifierIn

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

2019-07-12 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a project: clang. New lines are added to test ctu-main.c to make code execute when a function with invalid source range is encountered on bug path with NoStoreFuncVisitor. Repository

[PATCH] D64635: [CrossTU] Added CTU argument to diagnostic consumer create fn.

2019-07-12 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a project: clang. The PListDiagnosticConsumer needs a new CTU parameter that is passed through the create functions. Repository: rC Clang https://reviews.llvm.org/D64635 Files:

[PATCH] D64638: [CrossTU] Fix plist macro expansion if macro in other file.

2019-07-12 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a project: clang. When cross TU analysis is used it is possible that a macro expansion is generated for a macro that is defined (and used) in other than the main translation unit. To g

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

2019-07-14 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The problem is already corrected in clang9 but maybe not in clang8. Something similar is fixed in https://reviews.llvm.org/rC357329. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64628/new/ https://reviews.llvm.org/D64628 ___

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

2019-07-14 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The mentioned commit has a test that reproduces the same problem, so this revision is not needed (abandon it?). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64628/new/ https://reviews.llvm.org/D64628

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

2019-07-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Probably change to CXX14? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64477/new/ https://reviews.llvm.org/D64477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

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

2019-07-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 209768. balazske added a comment. - Change to Lang_CXX14. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64477/new/ https://reviews.llvm.org/D64477 Files: unittests/AST/ASTImporterVisibilityTest.cpp Index: unittests/AST/

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

2019-07-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. 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. Anyway, CXX14 is more future proof. Later there should follow the test with variable temp

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

2019-07-15 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366061: [ASTImporter] Using Lang_CXX14 in ASTImporterVisibilityTest. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CH

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

2019-07-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I do not know how the AST import is relevant in this case, the 'implicit' function is not imported here. The test does something similar as the mentioned one, only the reported problem is after the imported function. Repository: rC Clang CHANGES SINCE LAST ACTION

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

2019-07-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: include/clang/AST/ASTImporter.h:317 +std::shared_ptr SharedState = nullptr, +ASTUnit *Unit = nullptr); martong wrote: > What if we provided an

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

2019-07-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as not done. balazske added inline comments. Comment at: include/clang/AST/ASTImporter.h:317 +std::shared_ptr SharedState = nullptr, +ASTUnit *Unit = nullptr); balazske wrote: > martong wrote: >

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

2019-07-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 210490. balazske marked an inline comment as not done. balazske added a comment. - Renamed 'Unit', changed constructors. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64554/new/ https://reviews.llvm.org/D64554 Files: incl

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

2019-07-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 4 inline comments as done. balazske added inline comments. Comment at: include/clang/AST/ASTImporter.h:288 +ASTContext &FromContext, FileManager &FromFileManager, +ASTUnit *FromUnit, bool MinimalImport, +std::shared_

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

2019-07-18 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366449: [CrossTU] Add a function to retrieve original source location. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit

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

2019-07-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Commit was reverted because we were not aware of that clangAST library can not use clangFrontend library. So a different solution is needed, probably pass a SourceLocation import callback to ASTImporter. (A `Preprocessor` that can be used in place of `ASTUnit` here can

[PATCH] D64638: [CrossTU] Fix plist macro expansion if macro in other file.

2019-07-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a reviewer: ilya-biryukov. balazske added a subscriber: ilya-biryukov. balazske added a comment. @ilya-biryukov Please check if it is acceptable to use `ASTUnit` in PlistDiagnostic.cpp. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64638/new/ http

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

2019-07-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: shafik. Herald added a project: clang. A new function will be added to get the original SourceLocation for a SourceLocation that was impor

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

2019-07-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. New patch: https://reviews.llvm.org/D65064 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64554/new/ https://reviews.llvm.org/D64554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

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

2019-07-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 211059. balazske marked an inline comment as done. balazske added a comment. Removed ASTImporter from "callback" function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65064/new/ https://reviews.llvm.org/D650

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

2019-07-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/CrossTU/CrossTranslationUnit.cpp:476 + NewImporter->setFileIDImportHandler( + [this, Unit](FileID ToID, FileID FromID, ASTImporter &Importer) { +assert(ImportedFileIDs.find(ToID) == ImportedFileIDs.end() && -

[PATCH] D64635: [CrossTU] Added CTU argument to diagnostic consumer create fn.

2019-07-23 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366782: [CrossTU] Added CTU argument to diagnostic consumer create fn. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit

[PATCH] D64638: [CrossTU] Fix plist macro expansion if macro in other file.

2019-07-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. It is possible to use the `Preprocessor` instead of `ASTUnit` in `getImportedFromSourceLocation`. But this will contain less useful (even if currently not used) information. The test extension in D65064 is not possible to do if not `AS

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

2019-07-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/include/clang/CrossTU/CrossTranslationUnit.h:175 + /// returned. + llvm::Optional> + getImportedFromSourceLocation(const clang::SourceLocation &ToLoc) const; It would

[PATCH] D64638: [CrossTU] Fix plist macro expansion if macro in other file.

2019-07-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Maybe CrossTU should not use the Frontend library? (Now the StaticAnalyzerCore is using CrossTU and CrossTU is using Frontend, in this way StaticAnalyzerCore could use Frontend too.) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64638/n

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

2019-07-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 211454. balazske added a comment. Update diff to one commit with all changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65064/new/ https://reviews.llvm.org/D65064 Files: clang/include/clang/AST/ASTImpor

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

2019-07-24 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366884: [CrossTU] Add a function to retrieve original source location. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit

[PATCH] D64638: [CrossTU] Fix plist macro expansion if macro in other file.

2019-07-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The Frontend is needed because "ASTUnit.h" is added now into PlistDiagnostics.cpp. The `ASTUnit` object is used to pass information out from `getImportedFromSourceLocation`. The StaticAnalyzerCore library uses CrossTU library, and CrossTU uses Frontend, so I think it m

[PATCH] D65203: [ASTImporter] Do not import FunctionTemplateDecl in record twice.

2019-07-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. For functions there is a check to not duplicate the declaration

[PATCH] D64638: [CrossTU] Fix plist macro expansion if macro in other file.

2019-07-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 211689. balazske added a comment. Herald added a subscriber: mgorny. Added clangFrontend to CMakeLists.txt. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64638/new/ https://reviews.llvm.org/D64638 Files: lib/StaticAnalyze

[PATCH] D65269: [ASTImporter] Fix for import of friend class template with definition.

2019-07-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. If there is a friend class template "prototype" (forward declar

[PATCH] D64638: [CrossTU] Fix plist macro expansion if macro in other file.

2019-07-25 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367006: [CrossTU] Fix plist macro expansion if macro in other file. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHA

[PATCH] D64638: [CrossTU] Fix plist macro expansion if macro in other file.

2019-07-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Problem should be fixed now (r367013). Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64638/new/ https://reviews.llvm.org/D64638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[PATCH] D65203: [ASTImporter] Do not import FunctionTemplateDecl in record twice.

2019-07-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 211743. balazske added a comment. Added missing test fixture, removed not a related change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65203/new/ https://reviews.llvm.org/D65203 Files: clang/lib/AST/ASTI

[PATCH] D65445: [CrossTU] Handle case when no USR could be generated during Decl search.

2019-07-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a project: clang. When searching for a declaration to be loaded the "lookup name" for every other Decl is computed. If the USR can not be determined h

[PATCH] D65445: [CrossTU] Handle case when no USR could be generated during Decl search.

2019-07-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. It looks like that the problem can happen when the anonymous union is in any `DeclContext` and for CTU import the import of a variable is requested and that variable is in a related `DeclContext` (it can be at upper or lower level). (See code of `findDefInDeclContext`:

[PATCH] D65445: [CrossTU] Handle case when no USR could be generated during Decl search.

2019-07-31 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Probably this is a problem case too but only if the `f` or `i` has an initializer expression and really no USR is generated for `f` or `i`. But what I have found is that there is a `VarDecl` for a "invisible" variable whose type is the anonymous union and it has a (def

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-01 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. The default expression of a parameter variable should be import

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 2 inline comments as done. balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:3859 ToTypeSourceInfo, D->getStorageClass(), /*DefaultArg*/ nullptr)) return ToParm; ---

[PATCH] D65445: [CrossTU] Handle case when no USR could be generated during Decl search.

2019-08-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 212986. balazske added a comment. Rebase and add a new testing case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65445/new/ https://reviews.llvm.org/D65445 Files: clang/include/clang/CrossTU/CrossTranslat

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 213551. balazske added a comment. A new kind of solution, the previous does not work always. Still no test for this new problem case (circular dependency between a ParmVarDecl and function of it and a CXXDefaultArgExpr that references to the function probab

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 213563. balazske added a comment. Small but important fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65577/new/ https://reviews.llvm.org/D65577 Files: clang/include/clang/AST/ASTImporter.h clang/lib/A

[PATCH] D65445: [CrossTU] Handle case when no USR could be generated during Decl search.

2019-08-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 213571. balazske added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65445/new/ https://reviews.llvm.org/D65445 Files: clang/include/clang/CrossTU/CrossTranslationUnit.h clang/lib/Cross

[PATCH] D65445: [CrossTU] Handle case when no USR could be generated during Decl search.

2019-08-06 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368020: [CrossTU] Handle case when no USR could be generated during Decl search. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D65203: [ASTImporter] Do not import FunctionTemplateDecl in record twice.

2019-08-07 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368163: [ASTImporter] Do not import FunctionTemplateDecl in record twice. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to com

[PATCH] D65935: [ASTImporter] Import ctor initializers after setting flags.

2019-08-08 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. Code to import "ctor initializers" at import of functions is mo

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-08 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/test/Analysis/Inputs/ctu-other.cpp:135 + +struct DefParmContext { + static const int I; martong wrote: > shafik wrote: > > martong wrote: > > > Perhaps we could write `D

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-08 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Yes importing the parameters should be doable after the create of the function. I am not sure if it fixes this problem, the parameter that has the default expression can still be encountered without the default expression set in it. Repository: rG LLVM Github Monore

[PATCH] D65999: [ASTImporter] Import additional flags for functions.

2019-08-09 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. At AST import of function delcarations import the flags for def

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

2019-08-09 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I discovered that there are problems with this change. The number of loaded AST units is not incremented correctly and the "CTU loaded AST file" is displayed for every access to a AST unit (even if it was got from cache). The problem is that the counting and print of A

[PATCH] D65999: [ASTImporter] Import additional flags for functions.

2019-08-09 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:5239 +TEST_P(ASTImporterOptionSpecificTestBase, ImportOfDefaultImplicitFunctions) { + // Test that import of implicit functions works and the function

[PATCH] D66054: [CrossTU] Fix problem with CrossTU AST load limit and progress messages.

2019-08-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a project: clang. Number of loaded ASTs is to be incremented only if the AST was really loaded but not if it was returned from cache. At the same plac

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 214531. balazske added a comment. Rename of variables and reformat. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65577/new/ https://reviews.llvm.org/D65577 Files: clang/include/clang/AST/ASTImporter.h cl

[PATCH] D66054: [CrossTU] Fix problem with CrossTU AST load limit and progress messages.

2019-08-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 214532. balazske added a comment. - [CrossTU] Fix problem with CrossTU AST load limit and progress messages. - Reformat. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66054/new/ https://reviews.llvm.org/D66054

[PATCH] D65935: [ASTImporter] Import ctor initializers after setting flags.

2019-08-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. In this case the problem was that some of the flags of the already created and inserted `ToFunction` are not initialized. During the import of some "ctor initializers" this non-complete ToFunction may be accessed somehow (by structural equivalence or other code) and an

[PATCH] D66054: [CrossTU] Fix problem with CrossTU AST load limit and progress messages.

2019-08-12 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368545: [CrossTU] Fix problem with CrossTU AST load limit and progress messages. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D65999: [ASTImporter] Import additional flags for functions.

2019-08-12 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 2 inline comments as done. balazske added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:5239 +TEST_P(ASTImporterOptionSpecificTestBase, ImportOfDefaultImplicitFunctions) { + // Test that import of implicit functions works and the function

[PATCH] D65999: [ASTImporter] Import additional flags for functions.

2019-08-12 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 214585. balazske added a comment. - Using StringRef, added comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65999/new/ https://reviews.llvm.org/D65999 Files: clang/lib/AST/ASTImporter.cpp clang/unit

[PATCH] D65999: [ASTImporter] Import additional flags for functions.

2019-08-12 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:5239 +TEST_P(ASTImporterOptionSpecificTestBase, ImportOfDefaultImplicitFunctions) { + // Test that import of implicit functions works and the function

[PATCH] D65269: [ASTImporter] Fix for import of friend class template with definition.

2019-08-12 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368551: [ASTImporter] Fix for import of friend class template with definition. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: r

[PATCH] D65999: [ASTImporter] Import additional flags for functions.

2019-08-13 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 214772. balazske added a comment. - Moved SVEBuiltins test instantiation to non-different position. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65999/new/ https://reviews.llvm.org/D65999 Files: clang/lib/

[PATCH] D65999: [ASTImporter] Import additional flags for functions.

2019-08-13 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 2 inline comments as done. balazske added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:5373 +INSTANTIATE_TEST_CASE_P(ParameterizedTests, SVEBuiltins, +::testing::Values(ArgVector{"-target", a_sidor

[PATCH] D65999: [ASTImporter] Import additional flags for functions.

2019-08-13 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. balazske marked an inline comment as done. Closed by commit rL368655: [ASTImporter] Import additional flags for functions. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-

[PATCH] D65935: [ASTImporter] Import ctor initializers after setting flags.

2019-08-14 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 215056. balazske added a comment. - Moved 'ctor initializer' import before import of body. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65935/new/ https://reviews.llvm.org/D65935 Files: clang/lib/AST/ASTIm

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-14 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc50959431928: [ASTImporter] Import default expression of param before creating the param. (authored by balazske). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D65935: [ASTImporter] Import ctor initializers after setting flags.

2019-08-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. LLDB probably does the import in other way. CTU test fails without the fix: FAIL: Clang :: Analysis/ctu-main.cpp (540 of 15341) TEST 'Clang :: Analysis/ctu-main.cpp' FAILED Script: -- : 'RUN: at line 1'; rm -rf buil

[PATCH] D65935: [ASTImporter] Import ctor initializers after setting flags.

2019-08-16 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369098: [ASTImporter] Import ctor initializers after setting flags. (authored by balazske, 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-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske 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 ToDOrErr. martong wrote: > a_s

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

2019-06-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:4743 +} + INSTANTIATE_TEST_CASE_P(ParameterizedTests, ErrorHandlingTest, Maybe add a similar test for namespace and check that the error is not propagated? Repository: rG LL

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

2019-06-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7840 + // Push FromD to the stack, and remove that when we return. + ImportPathBuilder PathRAII(ImportPath, FromD); It is possible to use the `make_scope_exit` instead, this results in

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

2019-06-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske 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 ToDOrErr. martong wrote: > bal

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

2019-06-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske 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] = Error; We should not rem

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

2019-06-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:5000 EXPECT_TRUE(ImportedOK); } I see now that this test is really not required, the previous test checks the almost same thing in case of `class B` and `NS` (but more test

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