[PATCH] D49074: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager

2018-08-29 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. > where addition and subtraction is already supported? Is it though? From what I recall we had to disable it from the default set of options due to the fact that it gives rise to the exponential running time in some cases. I am somewhat afraid of similar unexpe

[PATCH] D51250: [analyzer] [NFC] Remove unused argument from makeSymExprValNN

2018-08-29 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340962: [analyzer] [NFC] Remove unused "state" argument from makeSymExprValNN (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://revi

[PATCH] D51251: [analyzer] Move analyzer-eagerly-assume to AnalyzerOptions, enable by default

2018-08-29 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340963: [analyzer] Move analyzer-eagerly-assume to AnalyzerOptions, enable by default (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: htt

[PATCH] D51252: [analyzer] Resolve the crash in ReturnUndefChecker

2018-08-29 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340965: [analyzer] Resolve the crash in ReturnUndefChecker (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D51252

[PATCH] D51251: [analyzer] Move analyzer-eagerly-assume to AnalyzerOptions, enable by default

2018-08-29 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340963: [analyzer] Move analyzer-eagerly-assume to AnalyzerOptions, enable by default (authored by george.karpenkov, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: ht

[PATCH] D51252: [analyzer] Resolve the crash in ReturnUndefChecker

2018-08-29 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340965: [analyzer] Resolve the crash in ReturnUndefChecker (authored by george.karpenkov, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D5125

[PATCH] D51323: [analyzer] Improve tracing for uninitialized struct fields

2018-08-29 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340986: [analyzer] Improve tracing for uninitialized struct fields (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.or

[PATCH] D51390: [analyzer] CallDescription: Improve array management.

2018-08-29 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. Strictly speaking those two seem like completely unrelated changes , right? Repository: rC Clang https://reviews.llvm.org/D51390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D51393: Provide a method for generating deterministic IDs for pointers allocated in BumpPtrAllocator

2018-08-29 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 163224. george.karpenkov edited the summary of this revision. george.karpenkov added a comment. In fact, generating a single "long" seems even better. https://reviews.llvm.org/D51393 Files: llvm/include/llvm/Support/Allocator.h Index: llvm/incl

[PATCH] D51395: [analyzer] Dump a reproducible, deterministic ID of program state to exploded graph

2018-08-29 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 163246. https://reviews.llvm.org/D51395 Files: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h clang/lib/StaticAnalyzer/Core/ExprEngine.cpp clang/lib/StaticAnalyzer/Core/ProgramState.cpp Index: clang/lib/StaticAnalyzer/Co

[PATCH] D51395: [analyzer] Dump a reproducible, deterministic ID of program state to exploded graph

2018-08-29 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. F7076011: image.png https://reviews.llvm.org/D51395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51395: [analyzer] Dump a reproducible, deterministic ID of program state to exploded graph

2018-08-29 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 163247. https://reviews.llvm.org/D51395 Files: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h clang/lib/StaticAnalyzer/Core/ExprEngine.cpp clang/lib/StaticAnalyzer/Core/ProgramState.cpp Index: clang/lib/StaticAnalyzer/Co

[PATCH] D51393: Provide a method for generating deterministic IDs for pointers allocated in BumpPtrAllocator

2018-08-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 163383. https://reviews.llvm.org/D51393 Files: llvm/include/llvm/Support/Allocator.h Index: llvm/include/llvm/Support/Allocator.h === --- llvm/include/llvm/Support/Allocator.h +++ ll

[PATCH] D51655: [analyzer] Remove traces of ubigraph visualization

2018-09-04 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. george.karpenkov added reviewers: dcoughlin, NoQ. Herald added subscribers: Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun, whisperity. Ubigraph project has been dead since about 2008, and to the best of my knowledge, no one w

[PATCH] D51388: [analyzer] NFC: Legalize state manager factory injection.

2018-09-05 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added inline comments. This revision is now accepted and ready to land. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h:33 /// introduce a type named \c NameTy. - /// The macro should n

[PATCH] D51680: [analyzer][UninitializedObjectChecker] New flag to ignore union-like constructs

2018-09-05 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp:468 +static bool isUnionLike(const RecordDecl *RD) { + llvm::Regex ContainsKindOrTag("[kK]ind|[tT]ag"); + 1. Since you are using `

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2018-09-05 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. Why explicitly skip C projects? We would not be able to match `std::X` functions anyway. https://reviews.llvm.org/D50488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2018-09-05 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. The code looks fine to me; @mgrang What evaluation steps have you performed? You note there are a few notable false positives, do you have ideas for suppressing those? https://reviews.llvm.org/D50488 ___ cfe-commi

[PATCH] D51393: Provide a method for generating deterministic IDs for pointers allocated in BumpPtrAllocator

2018-09-06 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 164255. george.karpenkov marked 2 inline comments as done. https://reviews.llvm.org/D51393 Files: llvm/include/llvm/Support/Allocator.h Index: llvm/include/llvm/Support/Allocator.h =

[PATCH] D51393: Provide a method for generating deterministic IDs for pointers allocated in BumpPtrAllocator

2018-09-06 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 164291. https://reviews.llvm.org/D51393 Files: llvm/include/llvm/Support/Allocator.h Index: llvm/include/llvm/Support/Allocator.h === --- llvm/include/llvm/Support/Allocator.h +++ ll

[PATCH] D51393: Provide a method for generating deterministic IDs for pointers allocated in BumpPtrAllocator

2018-09-06 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 164292. https://reviews.llvm.org/D51393 Files: llvm/include/llvm/Support/Allocator.h Index: llvm/include/llvm/Support/Allocator.h === --- llvm/include/llvm/Support/Allocator.h +++ ll

[PATCH] D51393: Provide a method for generating deterministic IDs for pointers allocated in BumpPtrAllocator

2018-09-06 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 164294. george.karpenkov added a comment. More casts. https://reviews.llvm.org/D51393 Files: llvm/include/llvm/Support/Allocator.h Index: llvm/include/llvm/Support/Allocator.h ===

[PATCH] D51393: Provide a method for generating deterministic IDs for pointers allocated in BumpPtrAllocator

2018-09-06 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341599: Provide a method for generating deterministic IDs for pointers allocated in… (authored by george.karpenkov, committed by ). Changed prior to commit: https://reviews.llvm.org/D51393?vs=164294&id=

[PATCH] D51655: [analyzer] Remove traces of ubigraph visualization

2018-09-06 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341601: [analyzer] Remove traces of ubigraph visualization (authored by george.karpenkov, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D5165

[PATCH] D51395: [analyzer] Dump a reproducible, deterministic ID of program state to exploded graph

2018-09-06 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341600: [analyzer] Dump a reproducible, deterministic ID of program state to exploded… (authored by george.karpenkov, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: ht

[PATCH] D51515: [analyzer] Add coverage information to plist output, update tests

2018-09-06 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC341621: [analyzer] Add coverage information to plist output, update tests (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.

[PATCH] D51669: [analyzer] [NFC] Prefer passing raw reference to value instead of a reference to unique_ptr

2018-09-06 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC341620: [analyzer] [NFC] Prefer passing around reference to std::unique_ptr& (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://revie

[PATCH] D51513: [analyzer] [NFC] Move methods for dumping the coverage in HTMLDiagnostics into the class

2018-09-07 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC341724: [analyzer] [NFC] Move methods for dumping the coverage in HTMLDiagnostics into… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: ht

[PATCH] D51512: [analyzer] [NFC] Use StringRef when returning a large string literal in HTMLDiagnostics

2018-09-07 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC341723: [analyzer] [NFC] Use StringRef when returning a large string literal in… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://r

[PATCH] D51822: Support generating unique identifiers for Stmt objects

2018-09-07 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. george.karpenkov added reviewers: NoQ, rsmith, bogner, aprantl, arphaman. Unlike pointer values, those identifiers are reproducible between the runs. https://reviews.llvm.org/D51822 Files: clang/include/clang/AST/Stmt.h clang/lib/AST/Stmt.cpp Index:

[PATCH] D51824: StmtPrinter: allow customizing the end-of-line character

2018-09-07 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. george.karpenkov added reviewers: NoQ, Eugene.Zelenko. Some environments need a different end-of-line character, namely, dot graphs. There, "\l" must be used to left-adjust the printed text, as "\n" centers everything printed. https://reviews.llvm.org/D51

[PATCH] D51948: [analyzer] Add ExprMutationAnalyzer

2018-09-11 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. Wow, thanks a lot, I'm really looking forward to using this! Repository: rC Clang https://reviews.llvm.org/D51948 ___ cfe-

[PATCH] D51950: [clangtidy] Remove old copy of ExprMutationAnalyzer

2018-09-11 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. Looks good to me, but I'm not the code owner. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D52036: [Analyzer] Use diff_plist in tests, NFC

2018-09-14 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. Thanks! A substitution would probably need to be defined in a different file though. https://reviews.llvm.org/D52036 ___ cfe-

[PATCH] D51946: [analyzer] Remove PseudoConstantAnalysis

2018-09-14 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. Great, thanks! Seems that your code is a better version of this check. Repository: rC Clang https://reviews.llvm.org/D51946 __

[PATCH] D52008: [analyzer] Handle forwarding reference better in ExprMutationAnalyzer.

2018-09-14 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. This looks very useful! Repository: rC Clang https://reviews.llvm.org/D52008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52113: Generate unique identifiers for Decl objects

2018-09-14 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. george.karpenkov added reviewers: NoQ, rsmith, aprantl. https://reviews.llvm.org/D52113 Files: clang/include/clang/AST/DeclBase.h clang/lib/AST/DeclBase.cpp Index: clang/lib/AST/DeclBase.cpp

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-20 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @delcypher sorry i don't agree with the change requests. @mracek any comments? Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:2298 SanitizerMask Res = ToolChain::getSupportedSanitizers(); - Res |= SanitizerKind::Address; - Res |= Sanit

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-20 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 156603. https://reviews.llvm.org/D15225 Files: clang/lib/Driver/ToolChains/Darwin.cpp clang/lib/Driver/ToolChains/Darwin.h clang/test/Driver/Inputs/resource_dir/lib/darwin/libclang_rt.asan_ios_dynamic.dylib clang/test/Driver/Inputs/resource

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-20 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337635: [Driver] Sanitizer support based on runtime library presence (authored by george.karpenkov, committed by ). Changed prior to commit: https://reviews.llvm.org/D15225?vs=156603&id=156639#toc Repo

[PATCH] D49627: [CFG] [analyzer] Constructors of member CXXOperatorCallExpr's argument 0 are not argument constructors.

2018-07-23 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. I take it we are crashing otherwise? Comment at: include/clang/Analysis/ConstructionContext.h:606 + unsigned Index; + // Whether the object needs to be

[PATCH] D49615: [ASTMatchers] Add an isMain() matcher

2018-07-23 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337761: [ASTMatchers] Add an isMain() matcher (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D49615?vs=156599&id

[PATCH] D49715: [analyzer] CallEvent: Add partially working methods for obtaining the callee stack frame.

2018-07-24 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. Minor nits mostly. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:411 + /// for bad reasons, returning null, even in p

[PATCH] D49749: [analyzer] Admit that we can't simplify the newly produced mixed Loc/NonLoc expressions.

2018-07-24 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added inline comments. This revision now requires changes to proceed. Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:1300 + Loc::isLocType(S->getRHS()->getType())) { +SVal V = SVB.ma

[PATCH] D49528: [analyzer] Syntactic matcher for leaks associated with run loop and autoreleasepool

2018-07-24 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337876: [analyzer] Syntactic matcher for leaks associated with run loop and… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://revie

[PATCH] D49058: [analyzer] Move DanglingInternalBufferChecker out of alpha

2018-07-25 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. @rnkovacs Personally I'm fine with moving it out of alpha then. If all the reports you have seen so far are true positives, then it's *amazing*. I would even go as far as fil

[PATCH] D49722: [CStringSyntaxChecker] Check strlcat sizeof check

2018-07-25 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. This has too much duplication with respect to your previous patch, and even Phabricator highlights it in yellow. Repository: rC Clang https://reviews.llvm.org

[PATCH] D49701: [ASTMatchers] Introduce a matcher for `ObjCIvarExpr`, support getting it's declaration

2018-07-26 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:44 #include "clang/AST/Expr.h" +#include "clang/AST/ExprObjC.h" #include "clang/AST/ExprCXX.h" aaron.ballman wrote: > This list should remain sorted alphab

[PATCH] D49701: [ASTMatchers] Introduce a matcher for `ObjCIvarExpr`, support getting it's declaration

2018-07-26 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 157520. https://reviews.llvm.org/D49701 Files: clang/docs/LibASTMatchersReference.html clang/include/clang/ASTMatchers/ASTMatchers.h clang/include/clang/ASTMatchers/ASTMatchersInternal.h clang/lib/ASTMatchers/ASTMatchersInternal.cpp clang/l

[PATCH] D49701: [ASTMatchers] Introduce a matcher for `ObjCIvarExpr`, support getting it's declaration

2018-07-27 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @aaron.ballman @alexfh Further concerns? https://reviews.llvm.org/D49701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49701: [ASTMatchers] Introduce a matcher for `ObjCIvarExpr`, support getting it's declaration

2018-07-27 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338137: [ASTMatchers] Introduce a matcher for `ObjCIvarExpr`, support getting it's… (authored by george.karpenkov, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: http

[PATCH] D49986: [ADT] ImmutableList::add parameters are switched

2018-07-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. I'm a bit confused: does it mean these methods are never called in Clang? Repository: rC Clang https://reviews.llvm.org/D49986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D49722: [CStringSyntaxChecker] Check strlcat sizeof check

2018-07-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added inline comments. This revision now requires changes to proceed. Comment at: lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp:154 -bool WalkAST::containsBadStrlcpyPattern(const CallExpr *CE) { +bool

[PATCH] D49998: [analyzer] Store ValueDecl in DeclRegion

2018-07-30 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338286: [analyzer] Store ValueDecl in DeclRegion (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D49998?vs=158027

[PATCH] D50012: [analyzer] Fix crash in RunLoopAutoreleaseChecker on empty children

2018-07-30 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338312: [analyzer] Fix crash in RunLoopAutoreleaseChecker on empty children (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://review

[PATCH] D49921: [analyzer] Bugfix for autorelease + main run loop leak checker

2018-07-30 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338314: [analyzer] Bugfix for autorelease + main run loop leak checker (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llv

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @aaron.ballman @alexfh @shuaiwang Would it be possible to move that code into a matcher, or into a something which could be used from Clang? We would also like to use similar functionality, but can't include stuff from clang-tidy. Repository: rCTE Clang Tool

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @rnk could you clarify how did it break the distributed asanified build? If the slave compiler supports asan it should have this runtime, right? Repository: rL LLVM https://reviews.llvm.org/D15225 ___ cfe-commit

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @rnk Regarding the error message, would it be possible to compromise on something like "sanitizer runtime not available"? I understand that the exact error message would be very useful for you, but it's just confusing for a user getting a toolchain with Xcode, s

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. > it's just that the runtime library didn't happen to exist on the system > performing compilation But then conceptually, the compiler toolchain on the system performing compilation is not fully supporting asan, right? It works for producing asanified object fi

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @rnk OK I see, we've accidentally posted comments nearly simultaneously. Repository: rL LLVM https://reviews.llvm.org/D15225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @rnk changing subjects: will you be at the LLVM social on Thursday? Could we discuss it there? Repository: rL LLVM https://reviews.llvm.org/D15225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @rnk OK it's fine with me to revert it now and then we see what can be done. Repository: rL LLVM https://reviews.llvm.org/D15225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-08-01 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @Szelethus Hi, do you plan to finish this patch soon-ish? I would like to evaluate it on a few codebases, but the pointer chasing is currently way too fragile / generates too many FPs. Repository: rC Clang https://reviews.llvm.org/D49438

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-08-02 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. > Dereferencing is disabled by default Great! Thank you! > but I haven't seen the current version of the checker crash due to pointer > chasing. @NoQ saw quite a few crashes during evaluation, right? > This might be a little nit-picking, but I don't think the

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-08-02 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. Great! The comment should be updated though. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:32 +// `-analyzer-config \

[PATCH] D43098: [analyzer] [tests] [NFC] Remove a fragile tightly-coupled component emulating parser output

2018-02-09 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC324759: [analyzer] [tests] [NFC] Remove a fragile tightly-coupled component emulating… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-02-09 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. Python code looks OK to me, I have one last request: could we have a small documentation how the whole thing is supposed work in integration, preferably on an available open-source project any reader could check out? I am asking because I have actually tried and

[PATCH] D43144: [analyzer] Implement path notes for temporary destructors.

2018-02-09 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added inline comments. This revision is now accepted and ready to land. Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:586 +// they'd be dealt with via an AutomaticObjectDtor instead. +const CFGTemporaryDto

[PATCH] D42458: [NFC] Extract method to SourceManager for traversing the macro "stack"

2018-02-09 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL324780: [NFC] Extract method to SourceManager for traversing the macro "stack" (authored by george.karpenkov, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://re

[PATCH] D42458: [NFC] Extract method to SourceManager for traversing the macro "stack"

2018-02-09 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC324780: [NFC] Extract method to SourceManager for traversing the macro "stack" (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://review

[PATCH] D43131: [analyzer] Serialize statistics to plist when serialize-stats=true is set

2018-02-09 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC324793: [analyzer] Serialize statistics to plist when serialize-stats=true is set (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://

[PATCH] D42775: [analyzer] Exploration strategy prioritizing unexplored coverage first

2018-02-12 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC324956: [analyzer] Exploration strategy prioritizing unexplored coverage first (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://rev

[PATCH] D43659: [analyzer] Don't crash when dynamic type of a concrete region is hard-set with placement new.

2018-02-22 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. LGTM, though in general I still think we should do something on soft-failure-modes in order to aid future debugging... Is the failure mode in this case always a UB? In this

[PATCH] D43218: [analyzer] Quickfix: do not overflow in calculating offset in RegionManager

2018-02-26 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326122: [analyzer] Quickfix: do not overflow in calculating offset in RegionManager (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://r

[PATCH] D43354: [analyzer] Exploration strategy prioritizing unexplored nodes first

2018-02-26 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326136: [analyzer] Exploration strategy prioritizing unexplored nodes first (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.l

[PATCH] D43421: [analyzer] Do not analyze bison-generated files

2018-02-26 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326135: [analyzer] Do not analyze bison-generated files (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D43421 File

[PATCH] D43791: [analyzer] Suppress MallocChecker positives in destructors with atomics.

2018-02-26 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:527 private: +bool shouldSuppressOnAtomicReferenceCountingPointers( +const Stmt *S, const LocationContext *CurrentLC); Docstring. C

[PATCH] D43782: [analyzer] Switch the default exploration strategy to priority queue based on coverage

2018-02-26 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326157: [analyzer] Switch the default exploration strategy to priority queue based on… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https:

[PATCH] D43791: [analyzer] Suppress MallocChecker positives in destructors with atomics.

2018-02-26 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2899 + // to find out if a likely-false-positive suppression should kick in. + for (const LocationContext *LC = CurrentLC; LC; LC = LC->getParent()) { +if (isa(LC->

[PATCH] D43791: [analyzer] Suppress MallocChecker positives in destructors with atomics.

2018-02-26 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. OK I would still appreciate a comment on why you expect fetch_add and friends in the lowest destructor in the stack. https://reviews.llvm.org/D43791 ___

[PATCH] D32842: Specify which sanitizers are covered by a sanitizer blacklist

2017-05-25 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @vsk Looks reasonable to me, although I would say such a change should probably require more tests. However, I am not a C++ expert, and I am still not overly familiar with a codebase, so I'm not sure whether I should be a single reviewer. https://reviews.llvm.

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-12-13 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. I've tried using the patch, and I got blocked at the following: CTU options are only exposed when one goes through `analyze-build` frontend, which requires `compi

[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

2017-12-14 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @dcoughlin my current iteration creates a `PathDiagnosticConsumer` which outputs HTML with this report. I think that makes much more sense (as essentially this is a way of visualizing the error path). https://reviews.llvm.org/D40809

[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

2017-12-15 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 127197. george.karpenkov edited the summary of this revision. george.karpenkov added a comment. Herald added a subscriber: mgorny. Fixed formatting, moved output to diagnostic consumer. https://reviews.llvm.org/D40809 Files: docs/ClangCommandLine

[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

2017-12-15 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @dcoughlin @NoQ I think this version is reasonable enough to get committed. Another easy iteration would be to change visitor to simply add the diagnostic to path, and move the actual printing to `CounterexampleDiagnostics`. https://reviews.llvm.org/D40809

[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

2017-12-15 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @alexshap That's a good question, and honestly I am not sure. It is probably a good idea to have the tests which run the counterexample dumper and check that it does not crash. As for the contents, I'm not sure: I would like to switch to generating HTML, and tes

[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

2017-12-18 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov abandoned this revision. george.karpenkov added a comment. Abandoned in favor of https://reviews.llvm.org/D41378 https://reviews.llvm.org/D40809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D41414: [analyzer] Add keyboard j/k navigation to HTML reports

2017-12-21 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321320: [analyzer] Add Javascript to analyzer HTML output to allow keyboard navigation. (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: ht

[PATCH] D41414: [analyzer] Add keyboard j/k navigation to HTML reports

2017-12-21 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321320: [analyzer] Add Javascript to analyzer HTML output to allow keyboard navigation. (authored by george.karpenkov, committed by ). Changed prior to commit: https://reviews.llvm.org/D41414?vs=127919&

[PATCH] D41680: [analyzer] do not crash with assertion on processing locations of bodyfarmed functions

2018-01-02 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. george.karpenkov added reviewers: dcoughlin, NoQ. Herald added subscribers: a.sidorin, szepet, kristof.beyls, xazax.hun, aemerson. This addresses an issue introduced in r183451: since `removePiecesWithInvalidLocations` is called *after* `adjustCallLocations

[PATCH] D41680: [analyzer] do not crash with assertion on processing locations of bodyfarmed functions

2018-01-02 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. The error is triggered when analyzer finds a bug *inside* the callable captured by the body farm. Probably we didn't see the crash in the wild because either a) the clang build did not have assertions enabled or b) the HTML output was not enabled and the bug nee

[PATCH] D41680: [analyzer] do not crash with assertion on processing locations of bodyfarmed functions

2018-01-02 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321682: [analyzer] do not crash with assertion on processing locations of bodyfarmed… (authored by george.karpenkov, committed by ). Repository: rC Clang https://reviews.llvm.org/D41680 Files: lib/S

[PATCH] D41749: [analyzer] suppress nullability inference from a macro when result is used in another macro

2018-01-04 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. george.karpenkov added reviewers: dcoughlin, NoQ. Herald added subscribers: a.sidorin, szepet, xazax.hun. The current code used to not suppress the report, if the dereference was performed in a macro, assuming it is that same macro. However, the assumption

[PATCH] D41751: [analyzer] [NFS] Minor refactoring of trackNullOrUndefValue

2018-01-04 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. george.karpenkov added reviewers: dcoughlin, NoQ. Herald added subscribers: a.sidorin, szepet, xazax.hun. Simple refactoring attempt: factor out some code, remove some repetition, use `auto` where appropriate. https://reviews.llvm.org/D41751 Files: lib

[PATCH] D41749: [analyzer] suppress nullability inference from a macro when result is used in another macro

2018-01-09 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322149: [analyzer] suppress nullability inference from a macro when result is used in… (authored by george.karpenkov, committed by ). Changed prior to commit: https://reviews.llvm.org/D41749?vs=128688&i

[PATCH] D41751: [analyzer] [NFC] Minor refactoring of trackNullOrUndefValue

2018-01-09 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322151: [analyzer] [NFC] Minor refactoring of trackNullOrUndefValue (authored by george.karpenkov, committed by ). Repository: rC Clang https://reviews.llvm.org/D41751 Files: lib/StaticAnalyzer/Core

[PATCH] D41790: [analyzer] [NFC] minor FindLastStoreBRVisitor refactoring

2018-01-09 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322150: [analyzer] [NFC] minor FindLastStoreBRVisitor refactoring (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2018-01-11 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:522 + ArraySize = Array->getSize().getLimitedValue(); + if (const auto *String = dyn_cast(Source)) { +StrLen = String->getLength(); Nesting this

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-02-28 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:100 void checkCall_strcat(const CallExpr *CE, const FunctionDecl *FD); + void checkDeprecatedOrUnsafeBufferHandling(const CallExpr *CE, const FunctionDecl *FD); voi

<    1   2   3   4   5   6   >