[PATCH] D151770: [NFC][CLANG] Fix nullptr dereference issue in SetValueDataBasedOnQualType()

Soumi Manna via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 31 10:19:41 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG5bb069246573: [NFC][CLANG] Fix nullptr dereference issue in SetValueDataBasedOnQualType() (authored by Manna).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151770/new/

https://reviews.llvm.org/D151770

Files:
  clang/lib/Interpreter/Interpreter.cpp


Index: clang/lib/Interpreter/Interpreter.cpp
===================================================================
--- clang/lib/Interpreter/Interpreter.cpp
+++ clang/lib/Interpreter/Interpreter.cpp
@@ -768,7 +768,7 @@
   if (const auto *ET = QT->getAs<EnumType>())
     QT = ET->getDecl()->getIntegerType();
 
-  switch (QT->getAs<BuiltinType>()->getKind()) {
+  switch (QT->castAs<BuiltinType>()->getKind()) {
   default:
     llvm_unreachable("unknown type kind!");
 #define X(type, name)                                                          \


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151770.527107.patch
Type: text/x-patch
Size: 549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230531/8303ada9/attachment.bin>


More information about the cfe-commits mailing list