[clang] [Sema] Check nullness of captured type before use (PR #72230)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 14 10:54:43 PST 2023
================
@@ -19773,6 +19773,8 @@ bool Sema::tryCaptureVariable(
// declcontext can either capture the variable or have already captured
// the variable.
CaptureType = Var->getType();
+ if (CaptureType.isNull())
----------------
shafik wrote:
I am not sure this is the right fix. I think by the time we are here we should have caught any errors. I made a comment in the bug report describing my alternative.
https://github.com/llvm/llvm-project/pull/72230
More information about the cfe-commits
mailing list