llvm-project
a7974c5d - [OpenACC] Make sure we mark vars as 'used' in OpenACC var references (#230503)

Commit
2 days ago
[OpenACC] Make sure we mark vars as 'used' in OpenACC var references (#230503) We weren't properly marking variables as 'used', which caused the bug in issue #230329. There is a function to clean this up at the end of an expression(CleanupVarDeclMarking) that we would never call as part of this handling. OpenMP does this correctly, so we do too. I wasn't able to reproduce it, but the 'invalid var' reference needs to be set as well, as I believe this will leave Sema in a 'bad' state if we don't, particularly if the function were to immediately end after the invalid reference (ActOnFinishFunctionBody asserts here, but it isn't clear to me we would have run afoul of this). Fixes: #230329
Author
Parents
Loading