Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL][NFC] Fix static code analysis concerns (#5189)
Found via a static-analysis tool: Suspicious dereference of pointer in function call before NULL check Inside checkAllowedSYCLInitializer() in SemaSYCL.cpp file: const Expr *Init = VD->getInit(); bool ValueDependent = Init->isValueDependent(); --> 'Init' is dereferenced by being passed as argument 0 to function "isValueDependent bool isConstantInit = Init && !ValueDependent && Init->isConstantInitializer(Context, false); --> 'Init' is checked for NULL here This patch adds NULL value checking for 'Init' expression. Signed-off-by: Soumi Manna <[email protected]>
- Loading branch information