kadircet added a comment.

FWIW, 
https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/Decl.cpp#L2987 is 
the assertion that suggests "null type is fine for functiondecls", but as 
pointed out pretty much all of the methods assume it's non-null && most of the 
users also don't check for validness before use.
so my 2cents, in the past this intermediate state of a functiondecl wasn't 
observable outside, but overtime that "constraint" got violated in various 
places.


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