[PATCH] D31697: Check for null before using TUScope

Zachary Turner via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 29 06:58:04 PDT 2017

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 <
reviews at reviews.llvm.org> wrote:

> 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<T>`.)
> So there's something in the parsing of builtins/intrinsics that requires
> `TUScope` to be non-null.
> Can we seed Sema with a valid `TUScope` before invoking
> `LateTemplateParser`, and if so, how? Or is this because we invoke the
> parser multiple times? I'm guessing Clang is already done parsing when we
> invoke the late template parsing.
> Grateful for any ideas here.
> https://reviews.llvm.org/D31697
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170629/cbf47807/attachment-0001.html>

More information about the cfe-commits mailing list