[PATCH] D59692: [ASTImporter] Fix name conflict handling

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

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

2019-07-24 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. I have a feeling that LoadPass and LoagGuard could be (should be) merged together, other than that we are getting close. Comment at: clang/include/clang/CrossTU/CrossTranslationUnit.h:185 + + /// Cached access to ASTUnit mapping information is

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

2019-07-17 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/lang/c/ast/TestAST.py:57 +# This expr command imports __sFILE with definition +# (FILE is a typedef to __sFILE.) +self.expect(

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

2019-07-17 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 210281. martong marked 5 inline comments as done. martong added a comment. - Applied clang-format on lldb parts (this changed two lines) - Added a comment for predicate - Merged the test into TestCModules.py Repository: rG LLVM Github Monorepo CHANGES

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

2019-07-25 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366997: [ASTImporter] Reorder fields after structure import is finished (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

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

2019-07-25 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/31743/ The previous build caught up the change, but http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/31742/ was stopped, perhaps a test got stucked. Repository: rL LLVM CHANGES

[PATCH] D65042: [Concept] Placeholder constraints and abbreviated templates

2019-07-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. `ASTImporter.cpp` and `ASTStructuralEquivalence.cpp` looks good to me! Comment at: lib/AST/ASTImporter.cpp:1286 - return Importer.getToContext().getAutoType(*ToDeducedTypeOrErr, - T->getKeyword(), -

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

2019-07-22 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65064/new/ https://reviews.llvm.org/D65064

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

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

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

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

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

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

[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-23 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372564: [ASTImporter][NFC] Add comprehensive tests for ODR violation handling strategies (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-23 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Trying to fix in svn commit 372633. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66951/new/ https://reviews.llvm.org/D66951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-23 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. 2nd attempt to fix the windows build errors: 372646 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66951/new/ https://reviews.llvm.org/D66951 ___ cfe-commits mailing list

[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] 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] 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] 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] 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] D60499: [ASTImporter] Various source location and range import fixes.

2019-11-14 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Ping @shafik @balazske Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60499/new/ https://reviews.llvm.org/D60499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D71018: [ASTImporter] Improved import of TypeSourceInfo (TypeLoc)

2019-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: balazske, a_sidorin. Herald added subscribers: cfe-commits, teemperor, gamesh411, Szelethus, jfb, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. martong added a parent

[PATCH] D71020: [ASTImporter] Friend class decl should not be visible in its context

2019-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: balazske, a_sidorin. Herald added subscribers: cfe-commits, teemperor, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. In the past we had to use

[PATCH] D70439: [Analyzer][Docs][NFC] Add CodeChecker to the command line tools

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

[PATCH] D69948: [Checkers] Added support for freopen to StreamChecker.

2019-12-03 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM, but wait for others please. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69948/new/ https://reviews.llvm.org/D69948

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

2019-12-03 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60499/new/ https://reviews.llvm.org/D60499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D71020: [ASTImporter] Friend class decl should not be visible in its context

2019-12-17 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4becf68c6f17: [ASTImporter] Friend class decl should not be visible in its context (authored by martong). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71612: [analyzer] Add PlacementNewChecker

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

[PATCH] D70439: [Analyzer][Docs][NFC] Add CodeChecker to the command line tools

2019-12-12 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4cfb91f1ef1b: [Analyzer][Docs][NFC] Add CodeChecker to the command line tools (authored by martong). Changed prior to commit: https://reviews.llvm.org/D70439?vs=232540=233590#toc Repository: rG LLVM

[PATCH] D71378: Modifying ImportDeclContext(...) to ensure that we complete each FieldDecl of a RecordDecl when we are importing the definiton

2019-12-12 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Just one more thing, maybe that is too overkill, but I think on a long term we could benefit from a unittest for this case. You could create a test similar to `LLDBLookupTest` in ASTImporterTest.cpp. In that Fixture we use Minimal import and the regular lookup (that is

[PATCH] D71378: Modifying ImportDeclContext(...) to ensure that we complete each FieldDecl of a RecordDecl when we are importing the definiton

2019-12-12 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Thanks for the patch! It look almost good to me, but I have a comment about the error handling. Comment at: clang/lib/AST/ASTImporter.cpp:1707 +if (Err) + return Err; +} Rather than just simply

[PATCH] D70819: [ASTImporter] Support functions with placeholder return types ...

2019-12-12 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D70819#170 , @shafik wrote: > Apologies for wacky C++ code that follows but will this also work for the > following cases: > > auto f2() { > auto l = []() { > struct X{}; > return X(); > }; >

[PATCH] D70819: [ASTImporter] Support functions with placeholder return types ...

2019-12-12 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added a comment. In D70819#1781678 , @martong wrote: > In D70819#170 , @shafik wrote: > > > Apologies for wacky C++ code that follows but will this also work

[PATCH] D70819: [ASTImporter] Support functions with placeholder return types ...

2019-12-12 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. martong marked an inline comment as done. Closed by commit rG25234fd69e32: [ASTImporter] Support functions with placeholder return types ... (authored by martong). Changed prior to commit:

[PATCH] D71018: [ASTImporter] Improved import of TypeSourceInfo (TypeLoc)

2019-12-12 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added a comment. > Are you going to add any tests in the following patches? I don't have any tests for now, but in a later patch we can create them. Comment at: clang/lib/AST/ASTImporter.cpp:8043 + + Error

[PATCH] D71020: [ASTImporter] Friend class decl should not be visible in its context

2019-12-12 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:334 + FromDC->lookup(FromNamed->getDeclName()); + if (std::find(FromLookup.begin(), FromLookup.end(), FromNamed) != + FromLookup.end()) a_sidorin wrote: >

[PATCH] D71020: [ASTImporter] Friend class decl should not be visible in its context

2019-12-12 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 233675. martong marked 4 inline comments as done. martong added a comment. Addressing Alexeis comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71020/new/ https://reviews.llvm.org/D71020 Files:

[PATCH] D70819: [ASTImporter] Support functions with placeholder return types ...

2019-12-07 Thread Gabor Marton via Phabricator via cfe-commits
martong added a reviewer: teemperor. martong marked an inline comment as done. martong added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:5625 + // parsed libcxx/src/filesystem/directory_iterator.cpp, but could not reduce + // that with creduce, because

[PATCH] D71018: [ASTImporter] Improved import of TypeSourceInfo (TypeLoc)

2019-12-05 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 232336. martong added a comment. IMPORT -> IMPORT_TYPE_LOC Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71018/new/ https://reviews.llvm.org/D71018 Files: clang/lib/AST/ASTImporter.cpp Index:

[PATCH] D70439: [Analyzer][Docs][NFC] Add CodeChecker to the command line tools

2019-12-05 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/www/analyzer/codechecker.html:13 + + + NoQ wrote: > Note related to your patch, but SSI seem to be completely broken these days; > previously the dropdown menus header kept working on the front page but now >

[PATCH] D70439: [Analyzer][Docs][NFC] Add CodeChecker to the command line tools

2019-12-05 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 232371. martong marked 15 inline comments as done. martong added a comment. Addressing Artem's review comments. Artem, thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70439/new/

[PATCH] D71112: [ASTImporter] Implicitly declare parameters for imported ObjCMethodDecls

2019-12-06 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Thanks for addressing this, I just have some minor comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:5603 +TEST_P(ASTImporterOptionSpecificTestBase, ImplicitlyDeclareSelf) { + Decl *FromTU = getTuDecl("__attribute__((objc_root_class))\n" +

[PATCH] D70439: [Analyzer][Docs][NFC] Add CodeChecker to the command line tools

2019-12-06 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 232540. martong marked 3 inline comments as done. martong added a comment. Put back the menu, add "open source" property. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70439/new/

[PATCH] D70439: [Analyzer][Docs][NFC] Add CodeChecker to the command line tools

2019-12-06 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 6 inline comments as done. martong added a comment. In D70439#1772168 , @Charusso wrote: > I would change the order of CCh and scan-build because we usually list stuff > in alphabetical order. Also the chronological order is that, the

[PATCH] D71112: [ASTImporter] Implicitly declare parameters for imported ObjCMethodDecls

2019-12-06 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/unittests/AST/Language.cpp:44 + case Lang_OpenCL: +llvm_unreachable("-std=objc++"); } I think, we should keep the "Not implemented yet!" message here. Perhaps you wanted "-std=objc++" to put next to -x

[PATCH] D71020: [ASTImporter] Friend class decl should not be visible in its context

2019-12-16 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 234062. martong marked an inline comment as done. martong added a comment. Simplify getRecordDeclOfFriend() further. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71020/new/ https://reviews.llvm.org/D71020

[PATCH] D71020: [ASTImporter] Friend class decl should not be visible in its context

2019-12-16 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:252 + QualType Ty = FD->getFriendType()->getType().getCanonicalType(); + if (isa(Ty)) +Ty = cast(Ty)->getNamedType(); a_sidorin

[PATCH] D69360: [NFC] Refactor representation of materialized temporaries

2019-10-29 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Herald added a subscriber: rnkovacs. Comment at: clang/lib/AST/ASTImporter.cpp:7004 + // FIXME: Should ManglingNumber get numbers associated with 'to' context? + auto* To = MaterializeTemporaryDecl::Create(Temporary, ExtendingDecl, +

[PATCH] D69566: [ASTImporter] Add support for BuiltinTemplateDecl

2019-10-29 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Comment at: clang/lib/AST/ASTImporter.cpp:4479 + } + assert(ToD && "BuiltinTemplateDecl of unsupported kind!"); + Importer.MapImported(D, ToD);

[PATCH] D70439: [Analyzer][Docs][NFC] Add CodeChecker to the command line tools

2019-11-19 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: NoQ, Szelethus, xazax.hun, dkrupp. Herald added subscribers: cfe-commits, Charusso, gamesh411, donat.nagy, arphaman, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, whisperity. Herald added a project: clang. We add a new

[PATCH] D70819: [ASTImporter] Support functions with placeholder return types ...

2019-12-02 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 231725. martong marked 4 inline comments as done. martong added a comment. - Address Alexei's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70819/new/ https://reviews.llvm.org/D70819 Files:

[PATCH] D70819: [ASTImporter] Support functions with placeholder return types ...

2019-12-02 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 9 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:3008 +// which is equal to the given DC. +bool isAncestorDeclContextOf(DeclContext *DC, Decl *D) { + DeclContext *DCi = D->getDeclContext();

[PATCH] D70819: [ASTImporter] Support functions with placeholder return types ...

2019-12-02 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Alexei, thanks for the assiduous review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70819/new/ https://reviews.llvm.org/D70819 ___ cfe-commits mailing list

[PATCH] D70819: [ASTImporter] Support functions with placeholder return types ...

2019-11-28 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: balazske, a_sidorin. Herald added subscribers: cfe-commits, teemperor, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. Support functions with

[PATCH] D70439: [Analyzer][Docs][NFC] Add CodeChecker to the command line tools

2019-11-28 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @Szelethus, Kristof thanks for the review. @NoQ Ping. I'd like to have an approve from somebody who is outside the CodeChecker/E/// gang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70439/new/

[PATCH] D69948: [Checkers] Added support for freopen to StreamChecker.

2019-11-28 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/test/Analysis/stream.c:160 +} else { + // Open failed, f1 points now to an invalid stream but this condition is currently not checked. + rewind(f1); This comment is confusing for me. Maybe there are

[PATCH] D68634: [ASTImporter] Imported FunctionDecls inherit attributes from existing functions

2019-10-08 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a_sidorin, balazske, dkrupp, vbridgers. Herald added subscribers: cfe-commits, teemperor, gamesh411, Szelethus, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. This way some CTU

[PATCH] D68634: [ASTImporter] Imported FunctionDecls inherit attributes from existing functions

2019-10-09 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added a comment. In D68634#1700591 , @a_sidorin wrote: > Hello Balasz, > In my opinion, importing and setting the attributes should be handled by the > stuff used in InitializeImportedDecl(). Can we

[PATCH] D68634: [ASTImporter] Imported FunctionDecls inherit attributes from existing functions

2019-10-09 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D68634#1701192 , @martong wrote: > In D68634#1700591 , @a_sidorin wrote: > > > Hello Balasz, > > In my opinion, importing and setting the attributes should be handled by > > the stuff

[PATCH] D71020: [ASTImporter] Friend class decl should not be visible in its context

2019-12-18 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Recommited in bc5b7e21e32 . I changed `llvm:is_contained` to a simple for loop over the lookup result. This way the copy assignment of the iterator is avoided even if windows STL is used.

[PATCH] D71734: [Modules] Handle tag types and complain about bad merges in C/Objective-C mode

2019-12-20 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/Serialization/ASTReader.cpp:9286 + false /*UseCanonicalDecls*/); + (void)Ctx.IsEquivalent(D, Canon); +} Would it be possible to check the structural non-equivalency with `ODRHash`? I wonder

[PATCH] D71612: [analyzer] Add PlacementNewChecker

2019-12-20 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CheckPlacementNew.cpp:32 + const MemRegion *BaseRegion = MRegion->getBaseRegion(); + assert(BaseRegion == Offset.getRegion()); + This

[PATCH] D71612: [analyzer] Add PlacementNewChecker

2019-12-20 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 22 inline comments as done. martong added a comment. Thank you guys for the assiduous review! Comment at: clang/lib/StaticAnalyzer/Checkers/CheckPlacementNew.cpp:22 +ProgramStateRef State) const; + mutable std::unique_ptr

[PATCH] D71612: [analyzer] Add PlacementNewChecker

2019-12-20 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 234857. martong marked 8 inline comments as done. martong added a comment. - Bugtype by value - Decompose Place to base region and offset - Add test for type hierarchy - Remove State check - Return directly with the size of the type in case of non-array new -

[PATCH] D71612: [analyzer] Add PlacementNewChecker

2019-12-20 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 234901. martong added a comment. - Better handling of unknown values Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71612/new/ https://reviews.llvm.org/D71612 Files:

[PATCH] D74542: [ASTImporter] Prevent the ASTImporter from creating multiple main FileIDs.

2020-02-13 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D74542#1874221 , @teemperor wrote: > In D74542#1874201 , @martong wrote: > > > Looks good to me! Thanks! > > Adding @balazske as another reviewer though. He worked on something > >

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-13 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG536456a7e93d: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax (authored by martong). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74542: [ASTImporter] Prevent the ASTImporter from creating multiple main FileIDs.

2020-02-13 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a reviewer: balazske. martong added a subscriber: balazske. martong added a comment. This revision is now accepted and ready to land. Looks good to me! Thanks! Adding @balazske as another reviewer though. He worked on something related to this, where

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-13 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 244376. martong marked 6 inline comments as done. martong added a comment. - Enable core checkers explicitly in test - Add ASCII art to depict a range list example Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-13 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:313-321 for (size_t I = 1; I != E; ++I) { const llvm::APSInt = BVF.getValue(R[I - 1].second + 1ULL, T); const llvm::APSInt = BVF.getValue(R[I].first

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-12 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: Szelethus, NoQ. Herald added subscribers: cfe-commits, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, kristof.beyls, xazax.hun, whisperity. Herald added a project: clang.

[PATCH] D73898: [analyzer] StdLibraryFunctionsChecker: Add argument constraints

2020-02-13 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 244430. martong added a comment. - Rebase to master Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73898/new/ https://reviews.llvm.org/D73898 Files:

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-12 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 244140. martong added a comment. - Remove debug dump - Add TryExpandAsInteger to CheckerHelpers.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74473/new/ https://reviews.llvm.org/D74473 Files:

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-12 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 244141. martong added a comment. - Remove PP declaration Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74473/new/ https://reviews.llvm.org/D74473 Files:

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-12 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > Harbormaster failed remote builds in B46321 > : Diff 244141! This is actually true, I have a test that crashes! Finally, a case where remote builds are proved to be useful! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-12 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 244143. martong added a comment. - EOFMacroIt -> MacroIt Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74473/new/ https://reviews.llvm.org/D74473 Files:

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-12 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 244173. martong marked 6 inline comments as done. martong added a comment. - Move include of Preprocessor.h to CheckerHelpers.cpp - Try -> try - Use PP.getIdentifierInfo - Handle parens in tryExpandAsInteger Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-12 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:571 +.Case( +{ReturnValueCondition(WithinRange, {{EOFv, EOFv}, {0, UCharMax}})}); };

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-12 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 244149. martong added a comment. - Fix crash in TryExpandAsInteger Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74473/new/ https://reviews.llvm.org/D74473 Files:

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-12 Thread Gabor Marton via Phabricator via cfe-commits
martong planned changes to this revision. martong marked 3 inline comments as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:533 + +IntValue.dump(); +return IntValue.getSExtValue();

[PATCH] D74554: [ASTImporter] Added visibility check for scoped enums.

2020-02-13 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:2600 + EnumDecl *FoundDef = FoundEnum->getDefinition(); + if (D->isThisDeclarationADefinition() && FoundDef) +return Importer.MapImported(D, FoundDef); shafik

[PATCH] D73898: [analyzer] StdLibraryFunctionsChecker: Add argument constraints

2020-02-24 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 246229. martong added a comment. Rebase on top of https://reviews.llvm.org/D74973 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73898/new/ https://reviews.llvm.org/D73898 Files:

[PATCH] D75063: [analyzer] StdLibraryFunctionsChecker: Add NotNull Arg Constraint

2020-02-24 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: NoQ, Szelethus, balazske, gamesh411, baloghadamsoftware, steakhal. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun, whisperity. Herald added a project: clang.

[PATCH] D74973: [analyzer] StdLibraryFunctionsChecker refactor w/ inheritance

2020-02-24 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:93 +ValueConstraint(ArgNo ArgN) : ArgN(ArgN) {} +virtual ProgramStateRef apply(ProgramStateRef State, const CallEvent , +

[PATCH] D74973: [analyzer] StdLibraryFunctionsChecker refactor w/ inheritance

2020-02-24 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @balazske See https://reviews.llvm.org/D75063 about the simple independent implementation of the NotNull constraint. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74973/new/ https://reviews.llvm.org/D74973

[PATCH] D73898: [analyzer] StdLibraryFunctionsChecker: Add argument constraints

2020-02-24 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:152 +break; + default: +llvm_unreachable("Unknown RangeConstraint kind!"); This `default`

[PATCH] D71018: [ASTImporter] Improved import of TypeSourceInfo (TypeLoc)

2020-02-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Thanks guys for the review and the comments! :) I am going to address all of them, but only during next week, I am on vacation for the rest of this week. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71018/new/

[PATCH] D71612: [analyzer] Add PlacementNewChecker

2020-01-21 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D71612#1828059 , @NoQ wrote: > This looks fantastic. Let's enable by it default! Ok, I've done that: https://github.com/llvm/llvm-project/commit/bc29069dc40 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75678: [analyzer] Skip analysis of inherited ctor as top-level function

2020-03-05 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. For those who are interested in more details please refer to the related discussion after the commit of the patch that introduces handling of inherited ctors . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75678: [analyzer] Skip analysis of inherited ctor as top-level function

2020-03-05 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added a reviewer: NoQ. Herald added subscribers: cfe-commits, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, whisperity. Herald added a reviewer: Szelethus. Herald

[PATCH] D74735: [analyzer] Add support for CXXInheritedCtorInitExpr.

2020-03-05 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Thanks Richard for the explanation. Artem, I think this justifies your suggestion to skip the analysis of inherited constructors as top level functions. I just created the patch https://reviews.llvm.org/D75678 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D75678: [analyzer] Skip analysis of inherited ctor as top-level function

2020-03-05 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 248473. martong marked an inline comment as done. martong added a comment. - Change comments, add FileCheck test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75678/new/ https://reviews.llvm.org/D75678 Files:

[PATCH] D74735: [analyzer] Add support for CXXInheritedCtorInitExpr.

2020-03-03 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @NoQ I've found the following reproducer to crash in `CallAndMessageChecker`: class a { public: a(int); }; struct b : a { using a::a; }; void c() { int d; b x(d); //Crash!, Note, x(0) causes no crash } I am working on a fix, but any

[PATCH] D75529: [analyzer] Limit UCharMax to min of max uchar or max int

2020-03-03 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Looks good to me! Thanks! Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:514 + // Set UCharMax to min of int or uchar maximum value. + //

[PATCH] D74735: [analyzer] Add support for CXXInheritedCtorInitExpr.

2020-03-02 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:932 + const CXXConstructExpr *getInheritingConstructor() const { +return cast(getInheritingStackFrame()->getCallSite()); + } This line causes a

[PATCH] D75665: [analyzer] On-demand parsing capability for CTU

2020-03-05 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/include/clang/CrossTU/CrossTranslationUnit.h:23 #include "llvm/ADT/StringMap.h" +#include "llvm/IR/DiagnosticInfo.h" +#include "llvm/IR/OperandTraits.h" Perhaps this include is needed only in the .cpp file?

[PATCH] D75665: [analyzer] On-demand parsing capability for CTU

2020-03-05 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/CallEvent.cpp:578 + + // Optional OnDemandParsingDatabase; + // if (Opts.CTUOnDemandParsing) left here some debugging Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75678: [analyzer] Skip analysis of inherited ctor as top-level function

2020-03-06 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Ping. Please prioritize this patch, since it is fixing a regression caused by https://reviews.llvm.org/D74735. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75678/new/ https://reviews.llvm.org/D75678

[PATCH] D75678: [analyzer] Skip analysis of inherited ctor as top-level function

2020-03-06 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 248678. martong added a comment. - Remove superfluous param x from test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75678/new/ https://reviews.llvm.org/D75678 Files:

[PATCH] D74735: [analyzer] Add support for CXXInheritedCtorInitExpr.

2020-03-06 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @steakhal There is a fix for the crash: https://reviews.llvm.org/D75678 Let's hope that patch get's in soon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74735/new/ https://reviews.llvm.org/D74735

[PATCH] D75698: [analyzer][WIP] Suppress bug reports where a tracked expression's latest value change was a result of an invalidation

2020-03-06 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > While invalidation is a fundamental part of static analysis, it is > unfortunately not an under-approximation (resulting in fewer but more precise > paths of execution) +1 for saying this out :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

<    3   4   5   6   7   8   9   10   11   12   >