================
@@ -263,6 +263,14 @@ namespace {
   }
 }
 
+QualType Expr::getEnumCoercedType(const ASTContext &Ctx) const {
+  bool NotEnumType = dyn_cast<EnumType>(this->getType()) == nullptr;
+  if (NotEnumType)
----------------
erichkeane wrote:

```suggestion
  if (!isa<EnumType>(this->getType()))
```

Though, would probably suggest just something like:
```
if (isa<EnumType>(getType())) return getType();

else if (const EnumConstantDecl *ECD = getEnumConstantDecl())
  return Ctx.getTypeDeclType...
return getType();

```

https://github.com/llvm/llvm-project/pull/81418
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to