[clang] [clang-tools-extra] [clang][AST] Fix crash in MatchChildASTVisitor::TraverseLambdaExpr (PR #70962)

2024-01-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/70962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][AST] Fix crash in MatchChildASTVisitor::TraverseLambdaExpr (PR #70962)

2023-11-16 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Would be nice to simply not crash in such case, whatever someone will fix > origin issue later is up to debate. I would like to see this change on 17.0.6 > (that means 2 weeks left to merge this). Unless someone fixes this somewere > in lower layers. The worry with

[clang] [clang-tools-extra] [clang][AST] Fix crash in MatchChildASTVisitor::TraverseLambdaExpr (PR #70962)

2023-11-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > * @AaronBallman Having a nullptr init capture seems fishy, do we actually > mean to allow capturing vla by reference here? That does seem fishy to me -- I would expect VLA to behave the same as a constant-size array in terms of what we capture. So I think we do want to

[clang] [clang-tools-extra] [clang][AST] Fix crash in MatchChildASTVisitor::TraverseLambdaExpr (PR #70962)

2023-11-10 Thread via cfe-commits
cor3ntin wrote: + @AaronBallman Having a nullptr init capture seems fishy, do we actually mean to allow capturing vla by reference here? https://github.com/llvm/llvm-project/pull/70962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] [clang][AST] Fix crash in MatchChildASTVisitor::TraverseLambdaExpr (PR #70962)

2023-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes When a lambda expression captures a VLA array by reference, the 'capture_init' array contains one element, which is 'nullptr'. While traversing the AST with the 'IgnoreUnlessSpelledInSource' flag,

[clang] [clang-tools-extra] [clang][AST] Fix crash in MatchChildASTVisitor::TraverseLambdaExpr (PR #70962)

2023-11-01 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/70962 When a lambda expression captures a VLA array by reference, the 'capture_init' array contains one element, which is 'nullptr'. While traversing the AST with the 'IgnoreUnlessSpelledInSource' flag, there is a