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

Wyatt Childers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 6 14:53:33 PST 2020


wchilders created this revision.
wchilders added reviewers: yaxunl, hans, rsmith.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
wchilders requested review of this revision.

Previously expressions were being printed in diagnostics via an implicit conversion to an expression template argument -- which would then be printed via some code with a comment suggesting the code path was only for completeness and rarely/never used; this was both roundabout, and subtle. This patch provides a more direct overload, though the patch is still imperfect, as it does not solve the associated LangOpts issue.

Additionally, to prevent similar issues in the future, this patch makes conversions from expressions to template arguments explicit.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90976

Files:
  clang/include/clang/AST/ASTNodeTraverser.h
  clang/include/clang/AST/Expr.h
  clang/include/clang/AST/TemplateBase.h
  clang/lib/AST/Expr.cpp
  clang/lib/AST/ItaniumMangle.cpp
  clang/lib/AST/JSONNodeDumper.cpp
  clang/lib/AST/TemplateBase.cpp
  clang/lib/Sema/SemaTemplateDeduction.cpp
  clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
  clang/lib/Sema/SemaTemplateVariadic.cpp
  clang/lib/Sema/TreeTransform.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90976.303553.patch
Type: text/x-patch
Size: 10619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201106/86047a90/attachment-0001.bin>


More information about the cfe-commits mailing list