[PATCH] D31697: Check for null before using TUScope

2021-06-07 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. This was eventually fixed in IWYU. I believe the problem is/was: - After code is parsed and the AST is built, Sema resets its `TUScope` member to null - We use Sema to lookup and define default constructors before traversing the AST using a RAV - Some yet-not-fully-identi

[PATCH] D31697: Check for null before using TUScope

2017-07-02 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. > only for the function templates that use Microsoft intrinsics (e.g. > _BitScanForward in TrailingZerosCounter.) > So there's something in the parsing of builtins/intrinsics that requires > TUScope to be non-null. For posterity, this was misdiagnosed on my part. It turn

Re: [PATCH] D31697: Check for null before using TUScope

2017-06-29 Thread Zachary Turner via cfe-commits
Might want to ask on cfe-dev or irc for more visibility since this review thread isn't getting much action On Thu, Jun 29, 2017 at 5:12 AM Kim Gräsman via Phabricator < revi...@reviews.llvm.org> wrote: > kimgr added a comment. > > I did some more debugging today. This happens when we attempt to an

[PATCH] D31697: Check for null before using TUScope

2017-06-29 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. I did some more debugging today. This happens when we attempt to analyze llvm/Support/MathExtras.h, and only for the function templates that use Microsoft intrinsics (e.g. `_BitScanForward` in `TrailingZerosCounter`.) So there's something in the parsing of builtins/intrin

[PATCH] D31697: Check for null before using TUScope

2017-06-11 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. We'd love to see this addressed, either in our code or in Clang. But we're not sure what to do on our end, so... a gentle ping for help! https://reviews.llvm.org/D31697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31697: Check for null before using TUScope

2017-04-10 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. For some context, the backtrace when this happens is: include-what-you-use.exe!clang::Scope::getEntity() Line 313C++ include-what-you-use.exe!clang::Sema::PushOnScopeChains(clang::NamedDecl * D=0x07ed05b0, clang::Scope * S=0x, bool AddToContex

[PATCH] D31697: Check for null before using TUScope

2017-04-04 Thread Zachary Turner via Phabricator via cfe-commits
zturner created this revision. To be honest I don't really understand anything about this code. I encountered a situation when running `include-what-you-use` against LLVM where `TUScope` was null here, triggering a segfault. Some surrounding comments and code suggests that this variable is sp