Page MenuHomePhabricator

donat.nagy (Donát Nagy)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 13 2018, 4:03 AM (32 w, 16 h)

Recent Activity

Dec 3 2018

donat.nagy added a comment to D54757: [clang-tidy] new check: bugprone-branch-clone.

Macro-generated long switches: I cannot access the check results right now, but if I recall correctly, the check assigned these errors to certain lines in the .inc files. This means that (1) it is not very easy to to suppress them with //NOLINT comments, but (2) it should be relatively easy to filter them by location (ignore all reports coming from .inc file).

Dec 3 2018, 2:35 PM · Restricted Project
donat.nagy added a comment to D54757: [clang-tidy] new check: bugprone-branch-clone.

I applied this check to the llvm + clang codebase, and I was surprised to see that it produced about 600 results (for comparison, the clang-tidy checks which are enabled by default produce approximately 6000 results together). I didn't go through the whole list, but after examining a few dozen random reports it seems that most of these are true positives: relatively short branches (usually one or two lines of code) are repeated for no obvious reason. I would guess that most of these fall into the "correct but too verbose" case, because otherwise the tests would have caught the problem, but I didn't try to understand their context.

Dec 3 2018, 8:31 AM · Restricted Project
donat.nagy updated the diff for D54757: [clang-tidy] new check: bugprone-branch-clone.

Minor correction in documentation

Dec 3 2018, 7:54 AM · Restricted Project

Nov 30 2018

donat.nagy added a comment to D54757: [clang-tidy] new check: bugprone-branch-clone.

At the end of the documentation I stated that the check examines the code after macro expansion. Is this note clear enough?

Nov 30 2018, 2:43 AM · Restricted Project
donat.nagy updated the diff for D54757: [clang-tidy] new check: bugprone-branch-clone.

Handle ternary operators, improve documentation

Nov 30 2018, 2:38 AM · Restricted Project

Nov 29 2018

donat.nagy added inline comments to D54757: [clang-tidy] new check: bugprone-branch-clone.
Nov 29 2018, 1:50 PM · Restricted Project

Nov 28 2018

donat.nagy updated the diff for D54757: [clang-tidy] new check: bugprone-branch-clone.

Correct a typo (ELSE instead of else)

Nov 28 2018, 8:41 AM · Restricted Project
donat.nagy added a comment to D54757: [clang-tidy] new check: bugprone-branch-clone.

I looked at the AstDiff library, but I think that it is overkill for my goals. The main feat of the AstDiff library is analyzing and presenting the differences between two AST subtrees, while this checker only needs a simple yes/no answer for "Are these branches identical?".

Nov 28 2018, 8:35 AM · Restricted Project
donat.nagy updated the diff for D54757: [clang-tidy] new check: bugprone-branch-clone.

Minor simplifications, add tests for macro handling

Nov 28 2018, 8:09 AM · Restricted Project

Nov 27 2018

donat.nagy added a comment to D54757: [clang-tidy] new check: bugprone-branch-clone.

I will add tests for macro handling later.

Nov 27 2018, 9:08 AM · Restricted Project
donat.nagy updated the diff for D54757: [clang-tidy] new check: bugprone-branch-clone.

Remove braces, move if parent checking to ASTMatcher, other minor improvements

Nov 27 2018, 9:04 AM · Restricted Project

Nov 21 2018

donat.nagy added a comment to D54757: [clang-tidy] new check: bugprone-branch-clone.

An example of duplicated code in Clang (it appears in llvm/tools/clang/lib/Frontend/Rewrite/RewriteMacros.cpp starting from line 128):

Nov 21 2018, 9:41 AM · Restricted Project
donat.nagy updated the diff for D54757: [clang-tidy] new check: bugprone-branch-clone.

Implement suggested improvements

Nov 21 2018, 9:31 AM · Restricted Project

Nov 20 2018

donat.nagy created D54757: [clang-tidy] new check: bugprone-branch-clone.
Nov 20 2018, 8:15 AM · Restricted Project

Nov 7 2018

donat.nagy added a comment to D52730: [analyzer] ConversionChecker: handle floating point.

Could someone with commit rights commit this patch (if it is acceptable)? I don't have commit rights myself.

Nov 7 2018, 4:27 AM
donat.nagy updated the diff for D52730: [analyzer] ConversionChecker: handle floating point.

Use ASTContext::getFloatTypeSemantics()

Nov 7 2018, 4:23 AM

Oct 30 2018

donat.nagy added a comment to D52730: [analyzer] ConversionChecker: handle floating point.

I found a solution for determining the precision value of a floating point type. Is this acceptable?

Oct 30 2018, 5:45 AM
donat.nagy updated the diff for D52730: [analyzer] ConversionChecker: handle floating point.

Use APFloat to determine precision of floating point type

Oct 30 2018, 5:24 AM

Oct 24 2018

donat.nagy added inline comments to D52730: [analyzer] ConversionChecker: handle floating point.
Oct 24 2018, 4:57 AM

Oct 19 2018

donat.nagy added inline comments to D52730: [analyzer] ConversionChecker: handle floating point.
Oct 19 2018, 2:29 AM
donat.nagy updated the diff for D52730: [analyzer] ConversionChecker: handle floating point.

Give a reference for the significand size values of the IEEE 754 floating point types; cleanup comments and formatting.

Oct 19 2018, 2:26 AM

Oct 18 2018

donat.nagy added inline comments to D52730: [analyzer] ConversionChecker: handle floating point.
Oct 18 2018, 8:41 AM
donat.nagy added a comment to D52730: [analyzer] ConversionChecker: handle floating point.

polite ping

Oct 18 2018, 1:50 AM

Oct 2 2018

donat.nagy added a comment to D52742: [analyzer][PlistMacroExpansion] Part 1.: New expand-macros flag.

What would happen if this checker encounters a variadic macro (introduced to the standard in in C++11, see syntax (3) and (4) here) or the # and ## preprocessor operators?

Oct 2 2018, 6:42 AM
donat.nagy added inline comments to D52730: [analyzer] ConversionChecker: handle floating point.
Oct 2 2018, 5:54 AM
donat.nagy updated the diff for D52730: [analyzer] ConversionChecker: handle floating point.

Fix formatting in tests; add a comment.

Oct 2 2018, 5:52 AM
donat.nagy retitled D52730: [analyzer] ConversionChecker: handle floating point from [analysis] ConversionChecker: handle floating point to [analyzer] ConversionChecker: handle floating point.
Oct 2 2018, 2:49 AM
donat.nagy updated subscribers of D52722: [analyzer] Move StdCLibraryFunctions to apiModeling.

I don't have commit rights, please commit for me @NoQ or @martong

Oct 2 2018, 1:06 AM

Oct 1 2018

donat.nagy created D52730: [analyzer] ConversionChecker: handle floating point.
Oct 1 2018, 9:54 AM
donat.nagy abandoned D52423: [analyzer] Make ConversionChecker load StdCLibraryFunctionsChecker.

I submitted a new patch, which moves stdCLibraryFunctions to apiModeling (https://reviews.llvm.org/D52722).

Oct 1 2018, 5:50 AM
donat.nagy created D52722: [analyzer] Move StdCLibraryFunctions to apiModeling.
Oct 1 2018, 5:45 AM

Sep 27 2018

donat.nagy added a comment to D52423: [analyzer] Make ConversionChecker load StdCLibraryFunctionsChecker.

Yes, moving StdCLibraryFunctionsChecker to an always-loaded package is probably a better solution than adding this one particular dependency link. (Evaluating these functions may be useful for other checkers as well, although it does not seem to change the results of other regression tests.) As an alternative to moving this checker to either the core or the apiModeling package, we could add unix.StdCLibraryFunctions to the dozen or so loaded-by-default checkers listed in lib/Driver/ToolChains/Clang.cpp without moving it to a different package. Which of these options is the best?

Sep 27 2018, 8:45 AM

Sep 24 2018

donat.nagy retitled D52423: [analyzer] Make ConversionChecker load StdCLibraryFunctionsChecker from Make ConversionChecker load StdCLibraryFunctionsChecker to [analyzer] Make ConversionChecker load StdCLibraryFunctionsChecker.
Sep 24 2018, 8:00 AM
donat.nagy created D52423: [analyzer] Make ConversionChecker load StdCLibraryFunctionsChecker.
Sep 24 2018, 7:59 AM