erichkeane added inline comments.

================
Comment at: clang/lib/AST/ExprConstant.cpp:11294
   QualType CanTy = T.getCanonicalType();
-  const BuiltinType *BT = dyn_cast<BuiltinType>(CanTy);
+  const BuiltinType *BT = cast<BuiltinType>(CanTy);
 
----------------
I don't think this is right.  BT is only dereferenced in the event that CanTy's 
type class is "Builtin".  We COULD introduce a scope around the Type::Builtin 
type and move this there, but this will now assert any time that CanTy is a 
Pointer, auto, etc.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151469

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to