[PATCH] D150212: [clang][Sema] Improve diagnostics for auto return type

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 29 09:30:29 PDT 2023


rsmith added inline comments.


================
Comment at: clang/include/clang/Sema/TemplateDeduction.h:338
 public:
-  TemplateSpecCandidateSet(SourceLocation Loc, bool ForTakingAddress = false)
       : Loc(Loc), ForTakingAddress(ForTakingAddress) {}
----------------
Do we need to allow the location to be set after the set is created? Giving this type an additional state where the location is absent seems error prone, and in the uses below it looks easy to set the location in the caller instead of the callee.


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

https://reviews.llvm.org/D150212



More information about the cfe-commits mailing list