ilya-biryukov added a subscriber: erichkeane.
ilya-biryukov added a comment.

It's true that `FunctionType` having a null type does break a lot of even its 
own methods,
e.g. even something as simple as `isVariadic` will dereference a null pointer 
as it uses `getType()->getAs<FunctionType>()`.

I am not entirely sure what the contract there should be either.

- Is it the client code of `FunctionDecl` itself that's responsible for 
checking the null type or methods of `FunctionDecl`?
- Would it be easier to avoid creating the functions altogether? (I remember 
seeing some legitimate use-cases for null types there, but I wonder if those 
could be modelled differently).

@aaron.ballman, @erichkeane what is Clang's stance on those? How should we 
proceed here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149733

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

Reply via email to