[PATCH] D146426: [Sema] Fix crash on __fp16 parameters in template instantiations

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 20 11:55:32 PDT 2023


aaron.ballman added reviewers: erichkeane, aaron.ballman.
aaron.ballman added a comment.

This feels like it's heading in the wrong direction -- the AST should not have holes in it. An invalid type should be replaced by a valid type (after diagnosing the invalid type, of course) so that we can keep as much of the AST around as possible (for example, we typically stub in `int` and continue compilation, as in: https://godbolt.org/z/MvxjGovGh), which should then result in a non-null `ParmVarDecl`. This way, we don't need to sprinkle nullptr checks all over the compiler when inspecting a function's parameters.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146426



More information about the cfe-commits mailing list