[clang] [NFC][Clang] Fix potential dereferencing of nullptr (PR #86759)

Tom Honermann via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 27 15:42:24 PDT 2024


================
@@ -289,7 +289,7 @@ class ComplexExprEmitter
                                         const BinOpInfo &Op);
 
   QualType GetHigherPrecisionFPType(QualType ElementType) {
-    const auto *CurrentBT = dyn_cast<BuiltinType>(ElementType);
+    const auto *CurrentBT = cast<BuiltinType>(ElementType);
----------------
tahonermann wrote:

This looks fine and is consistent with other type assumptions elsewhere in the same source file.

https://github.com/llvm/llvm-project/pull/86759


More information about the cfe-commits mailing list