[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-31 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. balazske marked 3 inline comments as done. Closed by commit rG4980c1333fa4: [clang][analyzer] Using CallDescription in StreamChecker. (authored by balazske). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-30 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. Let's make it 3! Thank you so much for sticking by, I guess one of the reasons why a patch so obviously great and desired took so long is that we still didn't figure out how we imagine the `CallDescriptionMap` to be integrated into lar

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso marked an inline comment as done. Charusso added a comment. This revision is now accepted and ready to land. My concern was the too heavy `Optional` and `bool` usage. Cool patch! Comment at: clang/lib/StaticAnalyzer/Checkers/StreamCheck

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Let's land this patch, given that it grew way too big for a refactoring pass, and let @balazske further clean things up later in his follow-up patches. This is already a large improvement and i'm very grateful! For the `Optional` vs. `bool` debat

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 22 inline comments as done and an inline comment as not done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:90-106 + FnCheck identifyCall(const CallEvent &Call, CheckerContext &C, + const Cal

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-30 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Its becoming a bit difficult to navigate inlines, could you please mark them as done as you address them? Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:61 + using FnCheck = bool (StreamChecker::*)(const CallEvent &, +

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 227093. balazske added a comment. - Redesign again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67706/new/ https://reviews.llvm.org/D67706 Files: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp clan

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:196 if (ExplodedNode *N = C.generateNonFatalErrorNode(state)) { if (!BT_illegalwhence) This is getting pretty messy, given that you've already made a transition i

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a reviewer: Charusso. Charusso requested changes to this revision. Charusso added a comment. This revision now requires changes to proceed. Could you please mark resolved issues as resolved? I would like to see what we miss, and what has been done. Comment at: c

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Ping again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67706/new/ https://reviews.llvm.org/D67706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 3 inline comments as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:288-290 + SymbolRef Sym = RetVal.getAsSymbol(); + stateNotNull = stateNotNull->set(Sym, StreamState::getOpened()); + stateNull = stateNull

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-11 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:288-290 + SymbolRef Sym = RetVal.getAsSymbol(); + stateNotNull = stateNotNull->set(Sym, StreamState::getOpened()); + stateNull = stateNull->set(Sym, StreamState::getOpenFailed());

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67706/new/ https://reviews.llvm.org/D67706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 222795. balazske marked an inline comment as done. balazske added a comment. - Re-design of eval functions. - Added a C++ test with fopen-looking function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67706/ne

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:60-61 private: - void Fopen(CheckerContext &C, const CallExpr *CE) const; - void Tmpfile(CheckerContext &C, const CallExpr *CE) const; - void Fclose(CheckerContext &C, const CallExpr *C

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-01 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 2 inline comments as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:109-110 bool StreamChecker::evalCall(const CallEvent &Call, CheckerContext &C) const { + if (!Call.isGlobalCFunction()) +return false;

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-01 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:109-110 bool StreamChecker::evalCall(const CallEvent &Call, CheckerContext &C) const { + if (!Call.isGlobalCFunction()) +return false; + balazske wrote: > Szele

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-01 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:127-131 + for (auto P : Call.parameters()) { +QualType T = P->getType(); +if (!T->isIntegralOrEnumerationType() && !T->isPointerType()) + return nullptr; + } --

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-01 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 3 inline comments as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:109-110 bool StreamChecker::evalCall(const CallEvent &Call, CheckerContext &C) const { + if (!Call.isGlobalCFunction()) +return false;

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-01 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. A few nits inline, otherwise the patch is awesome, thank you!! Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:60-61 private: - void Fopen(CheckerContext &C, const CallExpr *CE) const; - void Tmpfile(CheckerContext &C, const CallExp

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-01 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 222566. balazske added a comment. - Various code cleanups. Eval functions use CallEvent, CallExpr is removed from state. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67706/new/ https://reviews.llvm.org/D6770

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-09-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:90-106 + FnCheck identifyCall(const CallEvent &Call, CheckerContext &C, + const CallExpr *CE) const; + + void evalFopen(CheckerContext &C, const CallExpr *CE) const;

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-09-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:90-106 + FnCheck identifyCall(const CallEvent &Call, CheckerContext &C, + const CallExpr *CE) const; + + void evalFop

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-09-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D67706#1685963 , @Szelethus wrote: > It seems like this patch is diffed against your latest commit, not the master > branch. Yeah, seems so. The code looks great tho, thanks! Comment at: clang/lib/StaticAnalyz

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-09-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. It seems like this patch is diffed against your latest commit, not the master branch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67706/new/ https://reviews.llvm.org/D67706 __

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-09-27 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 222138. balazske added a comment. Using CallDescriptionMap. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67706/new/ https://reviews.llvm.org/D67706 Files: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cp

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-09-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Thanks! Woohoo, tests! You can go one step further to have a `CallDescriptionMap`, like in D62557 . This would replace the whole chain of `if`s with a map lookup (which is currently still a chain of `if`s under the hood, but a lot less code