[all-commits] [llvm/llvm-project] f9a2fb: [NFC][Concepts] Change the Source Range of Concept...

Erich Keane via All-commits all-commits at lists.llvm.org
Thu Feb 2 00:07:20 PST 2023

  Branch: refs/heads/release/16.x
  Home:   https://github.com/llvm/llvm-project
  Commit: f9a2fba812febc368bcff441604d9fe9d9988d6d
  Author: Erich Keane <erich.keane at intel.com>
  Date:   2023-02-02 (Thu, 02 Feb 2023)

  Changed paths:
    M clang/lib/Sema/SemaConcept.cpp

  Log Message:
  [NFC][Concepts] Change the Source Range of Concepts ParamMatching

As came up in the discussion on

We were asserting because the attempt to print a note found that our
source range for a immediately declared constraint (as a part of
Parameter Mapping Substitution) wasn't in order.

However, it doesn't really make sense to have the location of this be
the whole list of template arguments, as that would result in the range
bool func(std::thing<char*> auto foo) {}

Even if done correctly.  Instead, this patch makes the range be just
'foo' in this case (or a pointer right after 'auto' if unnamed).

(cherry picked from commit 42e371b174d4407ec5805010c2ecfef9c086b5c2)

More information about the All-commits mailing list