Re: [PATCH] D16179: [clang-tidy] Handle decayed types and other improvements in VirtualNearMiss check.

2016-01-16 Thread Gábor Horváth via cfe-commits
xazax.hun added inline comments. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:240 @@ -247,2 +239,3 @@ unsigned EditDistance = -BaseMD->getName().edit_distance(DerivedMD->getName()); +StringRef(BaseMD->getNameAsString()) +.ed

Re: [PATCH] D16044: getVariableName() for MemRegion

2016-01-20 Thread Gábor Horváth via cfe-commits
xazax.hun added inline comments. Comment at: tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp:660 @@ +659,3 @@ +} + +else if (auto SV = The else should go into the same line as the closing }. Comment at: tools/clang/lib/StaticAnalyzer/Co

Re: [PATCH] D16179: [clang-tidy] Handle decayed types and other improvements in VirtualNearMiss check.

2016-01-20 Thread Gábor Horváth via cfe-commits
xazax.hun added inline comments. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:54-55 @@ -53,16 +53,4 @@ // Both types must be pointers or references to classes. - if (const auto *DerivedPT = DerivedReturnTy->getAs()) { -if (const auto *BasePT = BaseReturnTy->getAs

Re: [PATCH] D16179: [clang-tidy] Handle decayed types and other improvements in VirtualNearMiss check.

2016-01-20 Thread Gábor Horváth via cfe-commits
xazax.hun updated this revision to Diff 45482. xazax.hun marked an inline comment as done. xazax.hun added a comment. - Addressed review comments. http://reviews.llvm.org/D16179 Files: clang-tidy/misc/VirtualNearMissCheck.cpp clang-tidy/misc/VirtualNearMissCheck.h test/clang-tidy/misc-vir

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-21 Thread Gábor Horváth via cfe-commits
xazax.hun added inline comments. Comment at: docs/clang-tidy/checks/performance-inefficient-algorithm.rst:3 @@ -2,3 +2,3 @@ -misc-inefficient-algorithm +performance-inefficient-algorithm == Eugene.Zelenko wrote: > alexfh wrote: > > After

Re: [PATCH] D15921: [analyzer] Utility to match function calls.

2016-01-23 Thread Gábor Horváth via cfe-commits
xazax.hun marked an inline comment as done. xazax.hun added a comment. Thank you for the fix and sorry for not noticing this. I was unlucky and the tests did pass on my machine. Repository: rL LLVM http://reviews.llvm.org/D15921 ___ cfe-commits

[PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-01-25 Thread Gábor Horváth via cfe-commits
xazax.hun created this revision. xazax.hun added a reviewer: alexfh. xazax.hun added subscribers: dkrupp, cfe-commits. This patch adds a checker to find semicolons that are probably unintended and modify the semantics of the program. See the examples and the documentation for more details. http

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-01-26 Thread Gábor Horváth via cfe-commits
xazax.hun marked 5 inline comments as done. xazax.hun added a comment. http://reviews.llvm.org/D16535 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-01-26 Thread Gábor Horváth via cfe-commits
xazax.hun updated this revision to Diff 45949. xazax.hun added a comment. - Fixed the nits pointed out by the review. http://reviews.llvm.org/D16535 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SuspiciousSemicolonCheck.cpp clang-tidy/misc/Susp

Re: [PATCH] D14736: [analyzer] DeadStoresChecker: Treat locals captured by reference in C++ lambdas as escaped.

2015-11-17 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. This looks good to me, I have one question inline. Comment at: lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp:425 @@ +424,3 @@ +llvm::DenseMap CaptureFields; +FieldDecl *ThisCaptureField; +LambdaClass->getCaptureFields(CaptureFields, Thi

Re: [PATCH] D14170: Fix false positive warning about memory leak for QApplication::postEvent

2015-11-17 Thread Gábor Horváth via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2514 @@ -2513,1 +2513,3 @@ + if (FName.endswith("postEvent") && + FD->getQualifiedNameAsString() == "QCoreApplication::postEvent") { Shouldn't you use == instead of

Re: [PATCH] D14629: [analyzer] Configuration file for scan-build.

2015-11-21 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. Clang tidy can pass per checker configuration to the static analyzer at the moment. I think it should not be hard to extend it. http://reviews.llvm.org/D14629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

Re: [PATCH] D14919: Fix IssueHash generation

2015-11-24 Thread Gábor Horváth via cfe-commits
xazax.hun added inline comments. Comment at: include/clang/StaticAnalyzer/Core/IssueHash.h:42 @@ -41,1 +41,3 @@ + llvm::StringRef BugType, const Decl *D, + const LangOptions& LangOpts); Please p

Re: [PATCH] D14203: [analyzer] Improve pointer arithmetic checker.

2015-11-24 Thread Gábor Horváth via cfe-commits
xazax.hun updated this revision to Diff 41022. xazax.hun marked 11 inline comments as done. xazax.hun added a comment. - Fixed some of the review comments. - Updated to latest trunk. http://reviews.llvm.org/D14203 Files: lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp test/Analysis/PR24

Re: [PATCH] D14203: [analyzer] Improve pointer arithmetic checker.

2015-11-24 Thread Gábor Horváth via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp:150 @@ +149,3 @@ +return getArrayRegion(Region, Polymorphic, AKind, C); + default: +break; xazax.hun wrote: > dcoughlin wrote: > > In general, I think it is b

[PATCH] D15007: [analyzer] Improve modelling of nullptr_t in the analyzer. Fix PR25414.

2015-11-26 Thread Gábor Horváth via cfe-commits
xazax.hun created this revision. xazax.hun added reviewers: zaks.anna, dcoughlin. xazax.hun added subscribers: cfe-commits, dkrupp. This is a fix for https://llvm.org/bugs/show_bug.cgi?id=25414 This patch is intended to improve the modelling of std::nullptr_t. http://reviews.llvm.org/D15007 Fil

Re: [PATCH] D14919: Fix IssueHash generation

2015-11-26 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. In http://reviews.llvm.org/D14919#297168, @seaneveson wrote: > I was wondering what sort of source code causes the crash, but I do think it > would be good to have a regression test. It is possible to generate bug reports without associated declaration, altough it i

Re: [PATCH] D15007: [analyzer] Improve modelling of nullptr_t in the analyzer. Fix PR25414.

2015-11-26 Thread Gábor Horváth via cfe-commits
xazax.hun updated this revision to Diff 41221. xazax.hun added a comment. Improved test cases. http://reviews.llvm.org/D15007 Files: lib/StaticAnalyzer/Core/RegionStore.cpp test/Analysis/nullptr.cpp Index: test/Analysis/nullptr.cpp ==

Re: [PATCH] D15007: [analyzer] Improve modelling of nullptr_t in the analyzer. Fix PR25414.

2015-11-26 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. In http://reviews.llvm.org/D15007#297183, @NoQ wrote: > There's a little problem with the `shouldNotCrash()` test: the first warning > on `invokeF()` on line 107 generates a sink, and the rest of the function > never gets executed. It's probably a good idea to split i

Re: [PATCH] D14736: [analyzer] DeadStoresChecker: Treat locals captured by reference in C++ lambdas as escaped.

2015-11-27 Thread Gábor Horváth via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. In the meantime I realized dead store analysis only works with local variables, so I think I answered my comment. It was commited in r253630 . http://

Re: add null pointer check

2015-11-30 Thread Gábor Horváth via cfe-commits
Hi! Thank you for reporting this. A more complete fix is available here: http://reviews.llvm.org/D14919 I recommend to use that one :) Best Regards, Gabor On 30 November 2015 at 21:38, Mathieu Baudet wrote: > Hello, > > While running some private CSA checkers on a recent checkout of clang >

Re: [PATCH] D14919: Fix IssueHash generation

2015-12-01 Thread Gábor Horváth via cfe-commits
xazax.hun closed this revision. xazax.hun added a comment. Committed in r254394. http://reviews.llvm.org/D14919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15007: [analyzer] Improve modelling of nullptr_t in the analyzer. Fix PR25414.

2015-12-01 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. In http://reviews.llvm.org/D15007#298086, @dcoughlin wrote: > Gabor, thanks for taking a look at this! > > I'm not sure `RegionStore::getBinding()` is the right place to put this logic. > > First, not all dereferences of a `std::nullptr_t` value go through > `getBindin

Re: [PATCH] D15007: [analyzer] Improve modelling of nullptr_t in the analyzer. Fix PR25414.

2015-12-01 Thread Gábor Horváth via cfe-commits
xazax.hun updated this revision to Diff 41494. xazax.hun added a comment. - Added the test case Devin suggested. - Implemented the fix Devin suggested. - Updated to latest trunk. http://reviews.llvm.org/D15007 Files: lib/StaticAnalyzer/Core/SValBuilder.cpp test/Analysis/nullptr.cpp Index:

[PATCH] D15227: [analyzer] Valist checkers.

2015-12-04 Thread Gábor Horváth via cfe-commits
xazax.hun created this revision. xazax.hun added reviewers: dcoughlin, zaks.anna, jordan_rose. xazax.hun added subscribers: dkrupp, cfe-commits. This checker was developed by Donat Nagy (m1nag...@gmail.com) and myself. It finds usages of uninitialized va_lists, and also unterminated va_lists.

[PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-10 Thread Gábor Horváth via cfe-commits
xazax.hun created this revision. xazax.hun added a reviewer: alexfh. xazax.hun added subscribers: dkrupp, cfe-commits. It is possible to assign arbitrary integer types to strings. Sometimes it is the result of missing to_string call or apostrophes. This check aims to find such errors. http://r

Re: [PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-10 Thread Gábor Horváth via cfe-commits
xazax.hun updated this revision to Diff 42406. xazax.hun added a comment. Minor update to docs. http://reviews.llvm.org/D15411 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/StringAssignmentCheck.cpp clang-tidy/misc/StringAssignmentCheck.h doc

Re: [PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-10 Thread Gábor Horváth via cfe-commits
xazax.hun updated this revision to Diff 42427. xazax.hun marked 5 inline comments as done. xazax.hun added a comment. - Modified the patch according to the review. http://reviews.llvm.org/D15411 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/Strin

Re: [PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-10 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. Thank you for the review. I have seen a few false positives in the llvm codebase. I agree that these kind of conversions are unfortunate but I am sure fixing this would cause a huge backward compatibility problem. Nontheless I also think that it might be something tha

Re: [PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-14 Thread Gábor Horváth via cfe-commits
xazax.hun marked 7 inline comments as done. Comment at: clang-tidy/misc/StringIntegerAssignmentCheck.cpp:19 @@ +18,3 @@ +namespace { +AST_MATCHER(QualType, isAnyCharacter) { return Node->isAnyCharacterType(); } +} // namespace aaron.ballman wrote: > I think this w

Re: [PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-14 Thread Gábor Horváth via cfe-commits
xazax.hun updated this revision to Diff 42698. xazax.hun marked an inline comment as done. xazax.hun added a comment. - Addressed review comments. - Removed fixit suggestions. http://reviews.llvm.org/D15411 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tid

Re: [PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-14 Thread Gábor Horváth via cfe-commits
xazax.hun updated this revision to Diff 42710. xazax.hun marked 4 inline comments as done. xazax.hun added a comment. - Reimplemented fixits. - Addressed the review comments. http://reviews.llvm.org/D15411 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy

Re: [PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-14 Thread Gábor Horváth via cfe-commits
xazax.hun added inline comments. Comment at: clang-tidy/misc/StringIntegerAssignmentCheck.cpp:20 @@ +19,3 @@ +AST_MATCHER(QualType, isAnyCharacter) { return Node->isAnyCharacterType(); } +} // namespace + aaron.ballman wrote: > alexfh wrote: > > I prefer `isAnyCha

Re: [PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-15 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. In http://reviews.llvm.org/D15411#310539, @alexfh wrote: > Thank you for the new awesome check! Thank you for the review. I committed the new matcher to clang as well. I went with isAnyCharacter name for now, but we can rename it anytime. Repository: rL LLVM htt

Re: [PATCH] D15227: [analyzer] Valist checkers.

2015-12-22 Thread Gábor Horváth via cfe-commits
xazax.hun marked 9 inline comments as done. xazax.hun added a comment. It was tested on gcc and rAthena (https://github.com/rathena/rathena). It did not find any issues in those projects, but I was able to find some issues that I artificially put into those projects. Comment a

[clang] [clang][dataflow][NFC] Add a FIXME to handling of union initialization. (PR #82239)

2024-02-19 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/82239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Correctly handle `InitListExpr` of union type. (PR #82348)

2024-02-20 Thread Gábor Horváth via cfe-commits
@@ -731,6 +723,18 @@ class TransferVisitor : public ConstStmtVisitor { FieldLocs.insert({Field, &Loc}); } +// In the case of a union, we don't in general have initializers for all +// of the fields. Create storage locations for the remaining fields (but +

[clang] [clang][dataflow] Correctly handle `InitListExpr` of union type. (PR #82348)

2024-02-20 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/82348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Correctly handle `InitListExpr` of union type. (PR #82348)

2024-02-20 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/82348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Correctly handle `InitListExpr` of union type. (PR #82348)

2024-02-20 Thread Gábor Horváth via cfe-commits
@@ -1104,12 +1104,22 @@ RecordStorageLocation *getBaseObjectLocation(const MemberExpr &ME, return Env.get(*Base); } -std::vector getFieldsForInitListExpr(const RecordDecl *RD) { +std::vector +getFieldsForInitListExpr(const InitListExpr *InitList) { + const RecordDecl *RD =

[clang] [clang][dataflow] Fix inaccuracies in `buildStmtToBasicBlockMap()`. (PR #82496)

2024-02-21 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. This is horrifying. It makes me think that we might want to revamp the CfgBlock interface at some point. https://github.com/llvm/llvm-project/pull/82496 ___ cfe-commits mailing list cfe-commits

[clang] [clang][dataflow] Remove deprecated `ValueModel::merge()` function. (PR #82602)

2024-02-22 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/82602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-07-01 Thread Gábor Horváth via cfe-commits
@@ -964,17 +966,34 @@ static bool pathOnlyInitializesGslPointer(IndirectLocalPath &Path) { return false; } -void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity, +void checkExprLifetime(Sema &SemaRef, const CheckingEntity &CEntity, Xazax-hu

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-07-01 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/96475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove a pointer union from the lifetime bound analysis (PR #97327)

2024-07-01 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun created https://github.com/llvm/llvm-project/pull/97327 Since all callers of the API is called with the same type, we do not actually need the pointer union. From 48f51032cb9228ea8704e4e2352b18ea182e1024 Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Mon, 1 Ju

[clang] [clang] Remove a pointer union from the lifetime bound analysis (PR #97327)

2024-07-01 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun closed https://github.com/llvm/llvm-project/pull/97327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Add clang-19 release notes for CSA (PR #97418)

2024-07-08 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/97418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Add clang-19 release notes for CSA (PR #97418)

2024-07-08 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: Small note, the screenshot has the "improvements" part, but I did not find that in the actual PR. https://github.com/llvm/llvm-project/pull/97418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM! Thanks! https://github.com/llvm/llvm-project/pull/107213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add lifetimebound attr to std::span/std::string_view constructor (PR #103716)

2024-08-14 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/103716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add lifetimebound attr to std::span/std::string_view constructor (PR #103716)

2024-08-14 Thread Gábor Horváth via cfe-commits
@@ -216,6 +216,59 @@ void Sema::inferGslOwnerPointerAttribute(CXXRecordDecl *Record) { inferGslPointerAttribute(Record, Record); } +void Sema::inferLifetimeBoundAttribute(FunctionDecl *FD) { + if (FD->getNumParams() == 0) +return; + + if (unsigned BuiltinID = FD->getB

[clang] [clang] Add lifetimebound attr to std::span/std::string_view constructor (PR #103716)

2024-08-14 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. Looks great, thanks! https://github.com/llvm/llvm-project/pull/103716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Fix -print-target-triple OS version for apple targets (PR #104037)

2024-08-14 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun created https://github.com/llvm/llvm-project/pull/104037 The target needs to be initialized in order to computer the correct target triple from the command line. Without initialized targets the OS component of the tripple might not reflect what would be computer by

[clang] [clang][driver] Fix -print-target-triple OS version for apple targets (PR #104037)

2024-08-14 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/104037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Fix -print-target-triple OS version for apple targets (PR #104037)

2024-08-14 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun updated https://github.com/llvm/llvm-project/pull/104037 From 3cb5a4539962fbdf11ccc07b9b1a8fa3bf2fec9a Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Wed, 14 Aug 2024 16:17:40 +0100 Subject: [PATCH] Fix -print-target-triple OS version for apple targets The targ

[clang] [clang][driver] Fix -print-target-triple OS version for apple targets (PR #104037)

2024-08-14 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun ready_for_review https://github.com/llvm/llvm-project/pull/104037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Fix -print-target-triple OS version for apple targets (PR #104037)

2024-08-15 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun closed https://github.com/llvm/llvm-project/pull/104037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Fix -print-target-triple OS version for apple targets (PR #104037)

2024-08-16 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: Hey, thanks for letting me know. Feel free to revert this for now! https://github.com/llvm/llvm-project/pull/104037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang][driver] Fix -print-target-triple OS version for apple targets" (PR #104563)

2024-08-16 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/104563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-04-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. Sorry for the delay. Nothing jumps out to me, feel free to merge it. https://github.com/llvm/llvm-project/pull/86536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun commented: I did not finish reviewing this, but wanted to send a couple of questions early to parallelize the process a bit. https://github.com/llvm/llvm-project/pull/87320 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/87320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
@@ -385,6 +388,185 @@ getFieldsGlobalsAndFuncs(const Stmt &S, FieldSet &Fields, } } +namespace { + +// Visitor that builds a map from record prvalues to result objects. +// This traverses the body of the function to be analyzed; for each result +// object that it encounters,

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
@@ -688,22 +689,45 @@ class Environment { /// and functions referenced in `FuncDecl`. `FuncDecl` must have a body. void initFieldsGlobalsAndFuncs(const FunctionDecl *FuncDecl); + static PrValueToResultObject + buildResultObjectMap(DataflowAnalysisContext *DACtx, +

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
@@ -688,22 +689,45 @@ class Environment { /// and functions referenced in `FuncDecl`. `FuncDecl` must have a body. void initFieldsGlobalsAndFuncs(const FunctionDecl *FuncDecl); + static PrValueToResultObject + buildResultObjectMap(DataflowAnalysisContext *DACtx, +

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
@@ -385,6 +388,185 @@ getFieldsGlobalsAndFuncs(const Stmt &S, FieldSet &Fields, } } +namespace { + +// Visitor that builds a map from record prvalues to result objects. +// This traverses the body of the function to be analyzed; for each result +// object that it encounters,

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-08 Thread Gábor Horváth via cfe-commits
@@ -688,22 +689,45 @@ class Environment { /// and functions referenced in `FuncDecl`. `FuncDecl` must have a body. void initFieldsGlobalsAndFuncs(const FunctionDecl *FuncDecl); + static PrValueToResultObject + buildResultObjectMap(DataflowAnalysisContext *DACtx, +

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-08 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/87320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-08 Thread Gábor Horváth via cfe-commits
@@ -385,6 +390,187 @@ getFieldsGlobalsAndFuncs(const Stmt &S, FieldSet &Fields, } } +namespace { + +// Visitor that builds a map from record prvalues to result objects. +// This traverses the body of the function to be analyzed; for each result +// object that it encounters,

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-08 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun commented: I know it is not exactly what we need, but I found `Expr::skipRValueSubobjectAdjustments` in the compiler. I think it might be a good idea to take a look just in case there is something we forgot to cover, and maybe in the future we could look for factor

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-08 Thread Gábor Horváth via cfe-commits
@@ -556,6 +763,10 @@ void Environment::pushCallInternal(const FunctionDecl *FuncDecl, const VarDecl *Param = *ParamIt; setStorageLocation(*Param, createObject(*Param, Args[ArgIndex])); } + + ResultObjectMap = std::make_shared( Xazax-hun wrote: I wo

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-08 Thread Gábor Horváth via cfe-commits
@@ -385,6 +390,187 @@ getFieldsGlobalsAndFuncs(const Stmt &S, FieldSet &Fields, } } +namespace { + +// Visitor that builds a map from record prvalues to result objects. +// This traverses the body of the function to be analyzed; for each result +// object that it encounters,

[clang] Add handling of the `-nostdlibinc` option to ccc-analyzer (PR #88017)

2024-04-08 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/88017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-09 Thread Gábor Horváth via cfe-commits
@@ -6830,50 +6932,6 @@ TEST(TransferTest, LambdaCaptureThis) { }); } -TEST(TransferTest, DifferentReferenceLocInJoin) { Xazax-hun wrote: What is the main reason for removing this test? https://github.com/llvm/llvm-project/pull/87320 ___

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-10 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/87320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Reland #87320: Propagate locations from result objects to initializers. (PR #88316)

2024-04-10 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/88316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix spurious availability warning (PR #94377)

2024-06-06 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun ready_for_review https://github.com/llvm/llvm-project/pull/94377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix spurious availability warning (PR #94377)

2024-06-06 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: Thos should fix the non-strict availability related repro from https://github.com/llvm/llvm-project/issues/40423 . It does not fix the strict case which is a separate codepath, so I did not mark this PR as fixing that bug report. https://github.com/llvm/llvm-project/pull/943

[clang] Fix spurious availability warning (PR #94377)

2024-06-06 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/94377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix spurious non-strict availability warning (PR #94377)

2024-06-06 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/94377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix spurious non-strict availability warning (PR #94377)

2024-06-06 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun closed https://github.com/llvm/llvm-project/pull/94377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Handle `AtomicExpr` in `ResultObjectVisitor`. (PR #94963)

2024-06-10 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/94963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][nullability] Don't return null fields from `getReferencedDecls()`. (PR #94983)

2024-06-10 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/94983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Clean up macOS version flags (PR #95374)

2024-06-13 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun created https://github.com/llvm/llvm-project/pull/95374 The -mmacos-version-min flag is preferred over -mmacosx-version-min. This patch makes updates the tests and documentation to make this clear and also adds the missing logic to scan build to handle the new flag

[clang] [clang] Clean up macOS version flags (PR #95374)

2024-06-13 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/95374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Clean up macOS version flags (PR #95374)

2024-06-16 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun updated https://github.com/llvm/llvm-project/pull/95374 From ad99b7f7587242060adf60d3e3f08711b0bc670d Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Thu, 13 Jun 2024 09:46:05 +0100 Subject: [PATCH] [clang] Clean up macOS version flags The -mmacos-version-min fl

[clang] [clang] Clean up macOS version flags (PR #95374)

2024-06-16 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun closed https://github.com/llvm/llvm-project/pull/95374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add a callback run on the pre-transfer state. (PR #96140)

2024-06-20 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/96140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][nullability] Propagate storage location / value of `++`/`--` operators. (PR #94217)

2024-06-03 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/94217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Propagate storage location of compound assignment operators. (PR #94332)

2024-06-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/94332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix spurious availability warning (PR #94377)

2024-06-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun created https://github.com/llvm/llvm-project/pull/94377 The availability attributes are stored on the function declarations. The code was looking for them in the function template declarations. This resulted in spuriously diagnosing availablity issues in contexts t

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: > It's unfortunate that the enum syntax is so bulky (the need for `Stmt::` and > the `Class` suffix). Once we can use C++20, it could get a bit better thanks to https://en.cppreference.com/w/cpp/language/enum#Using-enum-declaration. > I'm making this a non-draft PR and will a

[clang] [clang][dataflow] Treat `BuiltinBitCastExpr` correctly in `PropagateResultObject()`. (PR #88875)

2024-04-16 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/88875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Support `StmtExpr` in `PropagateResultObject()`. (PR #88872)

2024-04-16 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/88872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-17 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/88865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model conditional operator correctly. (PR #89213)

2024-04-18 Thread Gábor Horváth via cfe-commits
@@ -657,17 +658,25 @@ class TransferVisitor : public ConstStmtVisitor { } void VisitConditionalOperator(const ConditionalOperator *S) { -// FIXME: Revisit this once flow conditions are added to the framework. For -// `a = b ? c : d` we can add `b => a == c && !b =

[clang] [clang][dataflow] Model conditional operator correctly. (PR #89213)

2024-04-18 Thread Gábor Horváth via cfe-commits
@@ -657,17 +658,22 @@ class TransferVisitor : public ConstStmtVisitor { } void VisitConditionalOperator(const ConditionalOperator *S) { -// FIXME: Revisit this once flow conditions are added to the framework. For -// `a = b ? c : d` we can add `b => a == c && !b =

[clang] [clang][nullability] Remove `RecordValue`. (PR #89052)

2024-04-18 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/89052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model conditional operator correctly. (PR #89213)

2024-04-19 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/89213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model conditional operator correctly. (PR #89213)

2024-04-19 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/89213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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