[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-16 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 3 inline comments as done. Charusso added a comment. @NoQ, thanks for the review! Now everything is working by rL363515 . Comment at: cfe/trunk/test/Analysis/inlining/placement-new-fp-suppression.cpp:16 + +typedef unsigned

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-16 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked an inline comment as done. Charusso added a comment. In D62926#1545163 , @hintonda wrote: > This test fails to compile on Windows 64 bit builds. Please see > http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/77 Thanks

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: cfe/trunk/test/Analysis/inlining/placement-new-fp-suppression.cpp:16 + +typedef unsigned long uintptr_t; + hintonda wrote: > I don't believe this is really ever portable, but definitely not on 64 bit > Windows where

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: cfe/trunk/test/Analysis/inlining/placement-new-fp-suppression.cpp:16 + +typedef unsigned long uintptr_t; + Szelethus wrote: > hintonda wrote: > > I don't believe this is really ever portable, but definitely not on 64

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-16 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. This test fails to compile on Windows 64 bit builds. Please see http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/77 Comment at: cfe/trunk/test/Analysis/inlining/placement-new-fp-suppression.cpp:16 + +typedef unsigned long uintptr_t; +

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-15 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363491: [analyzer] ReturnVisitor: Bypass everything to see inlined calls (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Great, thanks!! Let's commit this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62926/new/ https://reviews.llvm.org/D62926 ___ cfe-commits

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-13 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked an inline comment as done. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:855 + + CurrentSFC = Node->getStackFrame(); + NoQ wrote: > Mmm, wait a sec. This way the loop condition is trivially

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-13 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 204698. Charusso marked an inline comment as done. Charusso added a comment. - Whoops. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62926/new/ https://reviews.llvm.org/D62926 Files: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:855 + + CurrentSFC = Node->getStackFrame(); + Mmm, wait a sec. This way the loop condition is trivially true. The second check on line 862 is also trivially true.

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-13 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 204625. Charusso marked 3 inline comments as done. Charusso added a comment. - Fixed comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62926/new/ https://reviews.llvm.org/D62926 Files: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Yup, this makes sense now! I'll do some nit-picking for a little longer. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:839 +// as a 'StmtPoint' so we have to bypass it. +const bool IsBypass = isa(S); + For now

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-12 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D62926#1539191 , @NoQ wrote: > All right, it seems that i'm completely misunderstanding this problem and > we've been talking past each other this whole time. > > The problem is not that we need to skip the

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-12 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 204331. Charusso marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62926/new/ https://reviews.llvm.org/D62926 Files: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. All right, it seems that i'm completely misunderstanding this problem and we've been talking past each other this whole time. The problem is not that we need to skip the `CXXConstructExpr`. The problem is that we need to skip `CXXNewExpr` (!!). CFG elements for an

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-11 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 2 inline comments as done. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:842-849 + if (Optional CEE = Node->getLocationAs()) if (CEE->getCalleeContext()->getCallSite() == S) break; -

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-11 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 204111. Charusso marked an inline comment as done. Charusso added a comment. - I have used `LocationContext::isParentOf()`which is not worked well, so I thought we are out of our context. - With that I made some misleading assumptions about our code.

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:842-849 + if (Optional CEE = Node->getLocationAs()) if (CEE->getCalleeContext()->getCallSite() == S) break; - if (auto SP = Node->getLocationAs()) -

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-10 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 2 inline comments as done. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:842-849 + if (Optional CEE = Node->getLocationAs()) if (CEE->getCalleeContext()->getCallSite() == S) break; -

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-10 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 203874. Charusso retitled this revision from "[analyzer] ReturnVisitor: Bypass constructing objects to see inlined calls" to "[analyzer] ReturnVisitor: Bypass everything to see inlined calls". Charusso added a comment. - The most generic approach.

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Aha, that's something! And nice to see we've already had this bug covered with tests. Because, of course, i added these tests a year ago without even thinking about what the correct behavior should look like :/ Comment at:

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/test/Analysis/new-ctor-null-throw.cpp:1-3 +// RUN: %clang_analyze_cc1 \ +// RUN: -analyzer-checker=core,debug.ExprInspection \ +// RUN: -std=c++11 -verify %s Hmm, how come you removed `-analyzer-config

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-05 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet. When we traversed backwards on