[PATCH] D90976: [NFC] Fixed an issue where diagnostics printed expressions in a roundabout way

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 11 06:51:14 PST 2021


hans added inline comments.


================
Comment at: clang/lib/AST/TemplateBase.cpp:485
   case TemplateArgument::Expression: {
-    // This shouldn't actually ever happen, so it's okay that we're
-    // regurgitating an expression here.
----------------
This code looks like a very special case, and the LangOptions comments suggests it's a bit hacky.
Because of that I'm not sure it makes sense to promote it to what looks like a general-purpose operator<< for Expr. What's the motivation for that?


================
Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:463
           .get();
+  TemplateArgument TV(Value);
   return DeduceNonTypeTemplateArgument(S, TemplateParams, NTTP,
----------------
nit: I guess TV is tor template value, but maybe TA would be a better name?


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

https://reviews.llvm.org/D90976



More information about the cfe-commits mailing list