[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D75356#1909610 , @balazske wrote: > The D75682 is the one that should be used > now, If this patch is supposed to be a followup to D75682 , could you

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75356/new/ https://reviews.llvm.org/D75356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I have "mirrored" all 3 changes in this stack to the new series in D75682 . Probably it is possible to reuse these revisions instead but I do not know if it will not confuse phabricator somehow (and how phabricator behaves in such

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Could you please fix up the dependencies of this revision? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75356/new/ https://reviews.llvm.org/D75356 ___ cfe-commits mailing

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D75356#1909193 , @balazske wrote: > To avoid problems I created a new version of this diff too that follows after > the other new ones: > https://reviews.llvm.org/D75682 > (Adding a new diff can make inline comment

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-06 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:92-125 +class MakeRetVal { + const CallExpr *CE = nullptr; + std::unique_ptr RetVal; + SymbolRef RetSym; + +public: + MakeRetVal(const CallEvent , CheckerContext )

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. To avoid problems I created a new version of this diff too that follows after the other new ones: https://reviews.llvm.org/D75682 (Adding a new diff can make inline comment positions even more inexact specially if the diff has many differences from an older one?)

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:37-40 + // NoError: No error flag is set or stream is not open. + // EofError: EOF condition (feof returns true) + // OtherError: other (non-EOF) error (ferror returns true) + //

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-05 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:37-40 + // NoError: No error flag is set or stream is not open. + // EofError: EOF condition (feof returns true) + // OtherError: other

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-05 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 8 inline comments as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:37-40 + // NoError: No error flag is set or stream is not open. + // EofError: EOF condition (feof returns true) + // OtherError: other

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Okay, I think we're mostly in agreement so far -- could we implement a warning and add some test files for unchecked stream states after a failed `fseek` call? The title of the revision is "[Analyzer][StreamChecker] Introduction of stream error state handling.", yet

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 5 inline comments as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:37-40 + // NoError: No error flag is set or stream is not open. + // EofError: EOF condition (feof returns true) + // OtherError: other

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 248155. balazske added a comment. - Moved enum comments. - Updated fseek behaviour. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75356/new/ https://reviews.llvm.org/D75356 Files:

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 4 inline comments as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:333-335 + // Ignore the call if the stream is is not tracked. + if (!State->get(StreamSym)) +return; Szelethus wrote:

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:92-125 +class MakeRetVal { + const CallExpr *CE = nullptr; + std::unique_ptr RetVal; + SymbolRef RetSym; + +public: + MakeRetVal(const CallEvent , CheckerContext )

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 247824. balazske marked 2 inline comments as done. balazske added a comment. Updated `StreamState` to include the error state. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75356/new/

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 247814. balazske added a comment. Removed `MakeRetVal`, fixed a bug in evalFseek. `evalFseek` is to be updated further. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75356/new/

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-03 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:92-125 +class MakeRetVal { + const CallExpr *CE = nullptr; + std::unique_ptr RetVal; + SymbolRef RetSym; + +public: + MakeRetVal(const

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:50-68 +struct StreamErrorState { + // The error state of an opened stream. + // EofError: EOF condition (feof returns true) + // OtherError: other (non-EOF) error (ferror returns

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-02 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:50-68 +struct StreamErrorState { + // The error state of an opened stream. + // EofError: EOF condition (feof returns true) + //

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:50-68 +struct StreamErrorState { + // The error state of an opened stream. + // EofError: EOF condition (feof returns true) + // OtherError: other (non-EOF) error (ferror returns

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-02-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, martong, Charusso, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: Szelethus. Herald added a project: clang. balazske added a parent