[PATCH] D50122: Complex Variable defined in InitCapture Crash fix

2018-08-08 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: lib/Sema/SemaTemplateInstantiate.cpp:2916-2918 + if (const VarDecl *VD = dyn_cast(D)) +if (VD->isInitCapture()) + return nullptr; Why are we failing to find the instantiation of the VarDecl in this case

[PATCH] D50122: Complex Variable defined in InitCapture Crash fix

2018-08-08 Thread Balaji Iyer via Phabricator via cfe-commits
bviyer added a comment. Ping! Repository: rC Clang https://reviews.llvm.org/D50122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50122: Complex Variable defined in InitCapture Crash fix

2018-08-02 Thread Balaji Iyer via Phabricator via cfe-commits
bviyer updated this revision to Diff 158870. bviyer added a comment. Simplified the case a bit more as requested by Erik. I also induced some errors in the test so that if someone symbolic-linked clang to /bin/true, the test will fail. Repository: rC Clang https://reviews.llvm.org/D50122 F

[PATCH] D50122: Complex Variable defined in InitCapture Crash fix

2018-08-01 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: test/SemaCXX/lambda-init-capture-vardefine.cpp:3 +// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify %s +// expected-no-diagnostics + These kinds of tests that don't check for any output are a bit dangerous, because t

[PATCH] D50122: Complex Variable defined in InitCapture Crash fix

2018-07-31 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi Balaji, Can you try to manually reduce the attached testcase? Its really difficult to understand exactly what is actually happening here, and why your fix is correct, without having a minimal reproducer. Ideally there would just be a few decls that succinctly

[PATCH] D50122: Complex Variable defined in InitCapture Crash fix

2018-07-31 Thread Balaji Iyer via Phabricator via cfe-commits
bviyer created this revision. bviyer added reviewers: erik.pilkington, ahatanak, arphaman, dexonsmith. Herald added a subscriber: cfe-commits. When a variable is defined in the init capture and it is of type struct that is dependent on additional structure, its definition is not found. An excepti