[all-commits] [llvm/llvm-project] a2f979: [Clang] Prevent null pointer dereference in Sema::...
smanna12 via All-commits
all-commits at lists.llvm.org
Thu May 2 06:22:42 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a2f97974e670379b28f7ad4701233fc162a46867
https://github.com/llvm/llvm-project/commit/a2f97974e670379b28f7ad4701233fc162a46867
Author: smanna12 <soumi.manna at intel.com>
Date: 2024-05-02 (Thu, 02 May 2024)
Changed paths:
M clang/lib/Sema/SemaCodeComplete.cpp
Log Message:
-----------
[Clang] Prevent null pointer dereference in Sema::​CodeCompleteQualifiedId() (#90490)
The null pointer dereference issue seems happening with in the
expression NNS->getAsType().
Although dyn_cast_or_null<TemplateTypeParmType>() correctly handles null
pointers, it doesn’t prevent the subsequent dereferencing operation.
The fix ensures that NNS pointer is not null before calling the
getAsType() method, thus preventing potential runtime errors caused by
attempting to access a null pointer.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list