[PATCH] D111283: [clang] template / auto deduction deduces common sugar

Matheus Izvekov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 13 05:52:23 PDT 2022


mizvekov added inline comments.


================
Comment at: clang/lib/AST/ASTContext.cpp:12367
+  case Type::Class:                                                            \
+    llvm_unreachable("Unexpected " Kind ": " #Class);
+
----------------
davrec wrote:
> Could we just return `X` here? Would that just default to the old behavior instead of crashing whenever unforeseen cases arise?  
No, I think we should enforce the invariants and make sure we are handling everything that can be handled.

Classing `TemplateTypeParm`  as sugar-free was what was wrong and we missed this on the review.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111283



More information about the cfe-commits mailing list