Page MenuHomePhabricator

jkorous (Jan Korous)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 18 2018, 2:22 AM (127 w, 22 h)

Recent Activity

Tue, Sep 22

jkorous added a comment to D88133: [Analyzer][WebKit] Use tri-state types for relevant predicates.

Created this for eventual post-commit review.

Tue, Sep 22, 9:58 PM · Restricted Project
jkorous committed rG47e6851423fd: [Analyzer][WebKit] Use tri-state types for relevant predicates (authored by jkorous).
[Analyzer][WebKit] Use tri-state types for relevant predicates
Tue, Sep 22, 9:57 PM
jkorous closed D88133: [Analyzer][WebKit] Use tri-state types for relevant predicates.
Tue, Sep 22, 9:57 PM · Restricted Project
jkorous requested review of D88133: [Analyzer][WebKit] Use tri-state types for relevant predicates.
Tue, Sep 22, 9:56 PM · Restricted Project
jkorous closed D83259: [Analyzer][WebKit] UncountedLocalVarsChecker.

I made a typo in the commit message reference so this revision didn't get closed automatically.

Tue, Sep 22, 12:03 PM
jkorous added a comment to D83259: [Analyzer][WebKit] UncountedLocalVarsChecker.

Thank you Artem!

Tue, Sep 22, 11:05 AM
jkorous committed rG8a64689e264c: [Analyzer][WebKit] UncountedLocalVarsChecker (authored by jkorous).
[Analyzer][WebKit] UncountedLocalVarsChecker
Tue, Sep 22, 11:05 AM

Mon, Sep 21

jkorous added inline comments to D87800: [WIP][Analyzer] find stack addresses leaked via out-params.
Mon, Sep 21, 11:19 PM
jkorous added a comment to D87800: [WIP][Analyzer] find stack addresses leaked via out-params.

Thank you both for all the hints!

Mon, Sep 21, 11:18 PM
jkorous requested review of D88070: [WIP][Analyzer] find stack addresses leaked via out-params - in checkEndFunction.
Mon, Sep 21, 10:59 PM
jkorous updated the diff for D87800: [WIP][Analyzer] find stack addresses leaked via out-params.

Simply check memory regions of LHS and RHS in assignments instead of AST pattern matching.

Mon, Sep 21, 10:56 PM
jkorous updated the diff for D83259: [Analyzer][WebKit] UncountedLocalVarsChecker.

Nits were addressed.

Mon, Sep 21, 10:38 AM
jkorous added inline comments to D83259: [Analyzer][WebKit] UncountedLocalVarsChecker.
Mon, Sep 21, 10:35 AM

Fri, Sep 18

jkorous updated the diff for D86230: [SourceManager] Skip module maps when searching files for macro arguments.

Attempt to write a unit test - so far can't reproduce even with unpatched master :(

Fri, Sep 18, 6:05 PM
jkorous updated the diff for D87176: [clang] Enable selectively turning on/off format-insufficient-args warning.

Added test

Fri, Sep 18, 12:54 PM

Wed, Sep 16

jkorous requested review of D87800: [WIP][Analyzer] find stack addresses leaked via out-params.
Wed, Sep 16, 3:14 PM

Tue, Sep 15

jkorous committed rGae726fecae9a: [SourceManager] Explicitly check for potential iterator underflow (authored by jkorous).
[SourceManager] Explicitly check for potential iterator underflow
Tue, Sep 15, 3:55 PM
jkorous closed D86231: [SourceManager] Explicitly check for potential iterator underflow.
Tue, Sep 15, 3:54 PM · Restricted Project

Mon, Sep 14

jkorous added a comment to D83259: [Analyzer][WebKit] UncountedLocalVarsChecker.

Friendly ping

Mon, Sep 14, 10:18 AM

Tue, Sep 8

jkorous updated subscribers of D83814: [clangd] Add Random Forest runtime for code completion..

Hi @usaxena95 and @sammccall,

Tue, Sep 8, 10:38 AM · Restricted Project

Fri, Sep 4

jkorous requested review of D87176: [clang] Enable selectively turning on/off format-insufficient-args warning.
Fri, Sep 4, 6:32 PM
jkorous committed rG7cfc8f0c7c24: [libclang] Add missing dependency on clangRewrite lib (authored by jkorous).
[libclang] Add missing dependency on clangRewrite lib
Fri, Sep 4, 3:00 PM
jkorous committed rG69e5abb57b70: [libclang] Add CXRewriter to libclang API (authored by jkorous).
[libclang] Add CXRewriter to libclang API
Fri, Sep 4, 2:17 PM
jkorous closed D86992: [libclang] Expose Rewriter in libclang API.
Fri, Sep 4, 2:17 PM · Restricted Project
jkorous committed rG052f83890349: [libclang] Expose couple more AST details via cursors (authored by jkorous).
[libclang] Expose couple more AST details via cursors
Fri, Sep 4, 1:41 PM
jkorous closed D86991: [libclang] Expose couple AST details.
Fri, Sep 4, 1:41 PM · Restricted Project
jkorous updated the diff for D86991: [libclang] Expose couple AST details.
  • renamed
  • added tests
Fri, Sep 4, 12:23 PM · Restricted Project
jkorous added a comment to D83259: [Analyzer][WebKit] UncountedLocalVarsChecker.

Sorry to bother you @NoQ - it'd be awesome if you could take a look!

Fri, Sep 4, 10:58 AM
jkorous closed D86990: [libclang] Source range conversion.

I forgot to add the magic "Differential revision:" prefix to the commit message :(

Fri, Sep 4, 10:56 AM
jkorous committed rGbaf3c77bd9f6: [libclang] Add translateCXRangeToCharRange conversion (authored by jkorous).
[libclang] Add translateCXRangeToCharRange conversion
Fri, Sep 4, 9:43 AM

Thu, Sep 3

jkorous updated the diff for D86990: [libclang] Source range conversion.
  • fix the doc comment
  • rename
Thu, Sep 3, 5:26 PM
jkorous updated the diff for D86992: [libclang] Expose Rewriter in libclang API.
  • added tests
  • renamed with prefix
Thu, Sep 3, 5:25 PM · Restricted Project
jkorous added a comment to D86230: [SourceManager] Skip module maps when searching files for macro arguments.
Thu, Sep 3, 11:13 AM
jkorous added a comment to D86230: [SourceManager] Skip module maps when searching files for macro arguments.

I could be missing something but it seemed that skipping module maps when we're searching for source locations is obviously the right thing to do. Don't really know if repeating what the code does in the comment would bring any value.

Thu, Sep 3, 11:12 AM
jkorous updated the diff for D86231: [SourceManager] Explicitly check for potential iterator underflow.

Add comment

Thu, Sep 3, 10:30 AM · Restricted Project
jkorous added a comment to D86231: [SourceManager] Explicitly check for potential iterator underflow.

Unfortunately, I don't have a test, sorry. I'm not trying to cut corners here - just thought that iterator referring to begin() value of a container should never be decremented so given the nature of the issue, simplicity of the fix and expected effort necessary to find a reliable test case it'd be more productive if I spend my time doing other work.

Thu, Sep 3, 10:29 AM · Restricted Project
jkorous committed rGc9239b2bf5f0: [Analyzer][docs][NFC] Fix typo in code example (authored by jkorous).
[Analyzer][docs][NFC] Fix typo in code example
Thu, Sep 3, 9:29 AM

Wed, Sep 2

jkorous updated the diff for D86990: [libclang] Source range conversion.
Wed, Sep 2, 1:15 PM
jkorous updated the diff for D86992: [libclang] Expose Rewriter in libclang API.
Wed, Sep 2, 1:09 PM · Restricted Project
jkorous added a comment to D86990: [libclang] Source range conversion.

You are absolutely right! I initially didn't realize the overloads of Rewriter methods can be of importance and haven't looked back since.

Wed, Sep 2, 11:10 AM
jkorous added a comment to D86990: [libclang] Source range conversion.

@akyrtzi IIUC you are saying we should try to push the char-range semantics from libclang API as deep as possible to see if we could avoid this annoying conversion. I think that's a reasonable long-term strategy.
But I also think we'll inevitably run into some clang APIs that use SourceRange for valid reasons and we won't be able to change those. Some other clang APIs might require significant amount of work to be enhanced.

Wed, Sep 2, 9:57 AM

Tue, Sep 1

jkorous added inline comments to D86840: [WIP] Fix Rewriter.
Tue, Sep 1, 5:12 PM
jkorous abandoned D86840: [WIP] Fix Rewriter.

I believe this is the correct approach: https://reviews.llvm.org/D86990

Tue, Sep 1, 5:10 PM
jkorous requested review of D86992: [libclang] Expose Rewriter in libclang API.
Tue, Sep 1, 5:06 PM · Restricted Project
jkorous requested review of D86991: [libclang] Expose couple AST details.
Tue, Sep 1, 5:05 PM · Restricted Project
jkorous requested review of D86990: [libclang] Source range conversion.
Tue, Sep 1, 5:04 PM
jkorous added a comment to D86840: [WIP] Fix Rewriter.

When we return source ranges from functions in libclang we use cxloc::translateSourceRange to convert them from SourceRange semantics to half-open character range CXSourceRange. I checked the cxloc::translateSourceRange implementation and also that we use it if not everywhere then very often.

Tue, Sep 1, 9:50 AM

Mon, Aug 31

jkorous added a comment to D86840: [WIP] Fix Rewriter.

Thanks a lot for this clarification! So, does that mean the issue is actually here?

static inline SourceRange translateCXSourceRange(CXSourceRange R) {
  return SourceRange(SourceLocation::getFromRawEncoding(R.begin_int_data),
                     SourceLocation::getFromRawEncoding(R.end_int_data));
}

I think it depends on what that CXSourceRange represents (how was it created).

Mon, Aug 31, 6:10 PM
jkorous added inline comments to D86840: [WIP] Fix Rewriter.
Mon, Aug 31, 6:08 PM
jkorous added a comment to D86840: [WIP] Fix Rewriter.

AFAIK SourceRange is supposed to always represent a token range (begin loc points to beginning of first token, end loc points to beginning of last token). For representing a character range, CharSourceRange should be used, though IMO its IsTokenRange member was a mistake, CharSourceRange should have only being used to represent half-open character-based range. This distinction is thankfully more clear on the Swift side.

Mon, Aug 31, 6:04 PM
jkorous added a comment to D86840: [WIP] Fix Rewriter.

So, to me it seems that the only problematic code-path is when I'm plumbing source range from libclang API (where I naturally need to convert from CXSourceRange to some internal type) to Rewriter as Rewriter::getRangeSize() makes an assumption about the input which is missing from its signature and documentation (and by proxy from other Rewriter methods).

Mon, Aug 31, 6:02 PM
jkorous updated the diff for D86840: [WIP] Fix Rewriter.

Added a random test and a bunch of notes (to be nuked before anything is committed).

Mon, Aug 31, 5:56 PM
jkorous added a reviewer for D86840: [WIP] Fix Rewriter: akyrtzi.
Mon, Aug 31, 5:39 PM
jkorous added a comment to D86840: [WIP] Fix Rewriter.

Honestly, the more I'm looking into this, the more puzzled I am - please assume that my previous conclusions weren't necessarily correct. I started adding notes to the code so I can keep track of my thoughts - I'll update the revision.

Mon, Aug 31, 5:38 PM

Sat, Aug 29

jkorous requested review of D86840: [WIP] Fix Rewriter.
Sat, Aug 29, 1:24 PM

Thu, Aug 27

jkorous added a comment to D83259: [Analyzer][WebKit] UncountedLocalVarsChecker.

Also, another thought - this idea is really alpha for us too in the sense that we still haven't gotten very good feel for how invasive it is. That means that it's pretty likely that it'll change and I would not be surprised if we for example decide to drop the requirement for embedded block.
I am wondering whether it makes sense to invest into refactoring now. Do you think landing it as it is would still somehow fit under the alpha label or is it expected such checkers to live out of tree until they mature enough?

Thu, Aug 27, 12:38 PM

Wed, Aug 26

jkorous added inline comments to D83259: [Analyzer][WebKit] UncountedLocalVarsChecker.
Wed, Aug 26, 10:50 PM
jkorous added a comment to D86231: [SourceManager] Explicitly check for potential iterator underflow.

Ping

Wed, Aug 26, 11:56 AM · Restricted Project
jkorous added a comment to D86230: [SourceManager] Skip module maps when searching files for macro arguments.

Ping

Wed, Aug 26, 11:55 AM

Aug 19 2020

jkorous committed rG4da126c3748f: [index-while-building] PathIndexer (authored by jkorous).
[index-while-building] PathIndexer
Aug 19 2020, 11:26 AM
jkorous closed D66854: [index-while-building] PathIndexer.
Aug 19 2020, 11:25 AM · Restricted Project
jkorous requested review of D86231: [SourceManager] Explicitly check for potential iterator underflow.
Aug 19 2020, 10:08 AM · Restricted Project
jkorous requested review of D86230: [SourceManager] Skip module maps when searching files for macro arguments.
Aug 19 2020, 10:06 AM

Aug 17 2020

jkorous added a comment to D66854: [index-while-building] PathIndexer.

Friendly ping

Aug 17 2020, 11:30 AM · Restricted Project
jkorous added a comment to D83259: [Analyzer][WebKit] UncountedLocalVarsChecker.

Friendly ping

Aug 17 2020, 11:30 AM

Aug 11 2020

jkorous updated the diff for D83259: [Analyzer][WebKit] UncountedLocalVarsChecker.

fix typo

Aug 11 2020, 5:32 PM
jkorous added inline comments to D83259: [Analyzer][WebKit] UncountedLocalVarsChecker.
Aug 11 2020, 3:54 PM

Aug 6 2020

jkorous updated the diff for D83259: [Analyzer][WebKit] UncountedLocalVarsChecker.
  • added docs
Aug 6 2020, 2:21 PM

Aug 5 2020

jkorous committed rG820e8d8656ec: [Analyzer][WebKit] UncountedLambdaCaptureChecker (authored by jkorous).
[Analyzer][WebKit] UncountedLambdaCaptureChecker
Aug 5 2020, 4:24 PM
jkorous closed D82837: [Analyzer][WebKit] UncountedLambdaCaptureChecker.
Aug 5 2020, 4:24 PM · Restricted Project

Aug 4 2020

jkorous updated the diff for D66854: [index-while-building] PathIndexer.

Addressed comments.

Aug 4 2020, 7:44 PM · Restricted Project
jkorous added inline comments to D66854: [index-while-building] PathIndexer.
Aug 4 2020, 2:38 PM · Restricted Project
jkorous added a comment to D82837: [Analyzer][WebKit] UncountedLambdaCaptureChecker.

Friendly ping

Aug 4 2020, 1:24 PM · Restricted Project
jkorous removed a reviewer for D83929: [clang]: Remove assertion which checks explicit declaration: Restricted Project.
Aug 4 2020, 1:06 PM · Restricted Project

Jul 20 2020

jkorous updated the diff for D66854: [index-while-building] PathIndexer.

Restore the patch. Previous update wasn't meant for this review - I confused the review IDs.

Jul 20 2020, 9:16 PM · Restricted Project
jkorous updated the diff for D64384: [WIP] Index-while-building.

Rebased on recent master + https://reviews.llvm.org/D66854

Jul 20 2020, 9:16 PM · Restricted Project

Jul 18 2020

jkorous updated the diff for D66854: [index-while-building] PathIndexer.

Rebased on recent master + https://reviews.llvm.org/D66854

Jul 18 2020, 6:13 PM · Restricted Project

Jul 16 2020

jkorous committed rG5e8b4be9f854: [AST][NFC] Simplify a regression test (authored by jkorous).
[AST][NFC] Simplify a regression test
Jul 16 2020, 12:08 PM

Jul 15 2020

jkorous updated the diff for D82837: [Analyzer][WebKit] UncountedLambdaCaptureChecker.

distinguish between raw-ptr & reference

Jul 15 2020, 4:44 PM · Restricted Project
jkorous added inline comments to D82837: [Analyzer][WebKit] UncountedLambdaCaptureChecker.
Jul 15 2020, 4:38 PM · Restricted Project
jkorous updated the diff for D82837: [Analyzer][WebKit] UncountedLambdaCaptureChecker.

I didn't figure out how to match the code snippet with the caret by using -verify. IIUC it supports only {error,warning,remark,note} diagnostics while the code snippet is neither of these.
I took inspiration from clang/test/Misc/caret-diags-multiline.cpp and just use FileCheck %s --strict-whitespace.

Jul 15 2020, 1:03 PM · Restricted Project

Jul 14 2020

jkorous committed rG779cde159bca: [AST][test] Add regression test forPointerExprEvaluator::VisitCXXNewExpr (authored by jkorous).
[AST][test] Add regression test forPointerExprEvaluator::VisitCXXNewExpr
Jul 14 2020, 4:57 PM
jkorous committed rG2964fdffdec1: PR45350: Handle unsized array CXXConstructExprs in constant evaluation of array… (authored by jkorous).
PR45350: Handle unsized array CXXConstructExprs in constant evaluation of array…
Jul 14 2020, 4:57 PM
jkorous committed rGdf8648dcc67e: [libclang]: visit BindingDecl in DecompositionDecl (authored by milianw).
[libclang]: visit BindingDecl in DecompositionDecl
Jul 14 2020, 4:55 PM
jkorous committed rGe7740aa3b489: [libclang]: visit C++17 if init statements (authored by milianw).
[libclang]: visit C++17 if init statements
Jul 14 2020, 4:55 PM
jkorous committed rGe21553977565: [DirectoryWatcher] Remove llvm_unreachable from unknown FSEvent handling (authored by jkorous).
[DirectoryWatcher] Remove llvm_unreachable from unknown FSEvent handling
Jul 14 2020, 4:53 PM
jkorous committed rG8aa134fba3fe: [Refactor] Speculative fix for assert in isBeforeInTranslationUnit() (authored by jkorous).
[Refactor] Speculative fix for assert in isBeforeInTranslationUnit()
Jul 14 2020, 4:38 PM
jkorous committed rGd8f5a008d213: [clang][doxygen] Fix false -Wdocumentation warning for tag typedefs (authored by jkorous).
[clang][doxygen] Fix false -Wdocumentation warning for tag typedefs
Jul 14 2020, 4:27 PM
jkorous committed rG131e2c642562: [clang][test][NFC] Use more widely supported sanitizer for file dependency tests (authored by jkorous).
[clang][test][NFC] Use more widely supported sanitizer for file dependency tests
Jul 14 2020, 4:15 PM
jkorous committed rG0c47feb2b26e: [clang] Fix out-of-bounds memory access in ComputeLineNumbers (authored by jkorous).
[clang] Fix out-of-bounds memory access in ComputeLineNumbers
Jul 14 2020, 4:13 PM
jkorous added a comment to D66854: [index-while-building] PathIndexer.

@arphaman can you please take a look at this patch?

Jul 14 2020, 9:29 AM · Restricted Project
jkorous added a reviewer for D66854: [index-while-building] PathIndexer: arphaman.
Jul 14 2020, 9:28 AM · Restricted Project

Jul 13 2020

jkorous added a comment to D83438: [AST] Fix potential nullptr dereference in Expr::HasSideEffects.

Sounds like a good idea.

Jul 13 2020, 12:20 PM · Restricted Project
jkorous committed rGfdb69539bcd2: [AST] Fix potential nullptr dereference in Expr::HasSideEffects (authored by jkorous).
[AST] Fix potential nullptr dereference in Expr::HasSideEffects
Jul 13 2020, 11:09 AM
jkorous closed D83438: [AST] Fix potential nullptr dereference in Expr::HasSideEffects.
Jul 13 2020, 11:09 AM · Restricted Project

Jul 10 2020

jkorous added inline comments to D70326: [docs] LLVM Security Group and Process.
Jul 10 2020, 12:43 PM · Restricted Project

Jul 9 2020

jkorous added a comment to D82837: [Analyzer][WebKit] UncountedLambdaCaptureChecker.

Oh no - nits are welcome as always!

Jul 9 2020, 11:30 PM · Restricted Project
jkorous updated the diff for D82837: [Analyzer][WebKit] UncountedLambdaCaptureChecker.
  • added documentation
Jul 9 2020, 5:10 PM · Restricted Project
jkorous updated the diff for D82837: [Analyzer][WebKit] UncountedLambdaCaptureChecker.
  • There's actually no reason to not print the name of the variable in either case.
  • I added a test for each explicit/implicit capture and made tests more specific overall.
Jul 9 2020, 4:31 PM · Restricted Project
jkorous added a comment to D82837: [Analyzer][WebKit] UncountedLambdaCaptureChecker.

I know what you mean - actionability of these warnings was my major concern too.

Jul 9 2020, 4:29 PM · Restricted Project