Prior to this patch we handled lambda captures based on their
initializer expression, which resulted in a pattern matching. With
C++17 copy elision the initializer expression can be anything,
and this approach proved to be fragile and a source of crashes.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/test/Analysis/lambdas.cpp | ||
---|---|---|
226 | It should have said REACHABLE. |
clang/test/Analysis/lambdas.cpp | ||
---|---|---|
226 | Oh, it's a nice catch. Yes, it should say REACHABLE indeed. Also it seems we didn't get a failing test case because this statement is not checked at all. It is inside a block that only runs if the standard is at least c++14, however the tests are only executed with an -std=c++11 flag. I moved these test cases into their own test file in D135965. |
It should have said REACHABLE.
How does this pass? @isuckatcs