[all-commits] [llvm/llvm-project] 82a11e: [Clang] Workaround dependent source location issue...

cor3ntin via All-commits all-commits at lists.llvm.org
Mon Sep 9 23:21:01 PDT 2024


  Branch: refs/heads/release/19.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 82a11e46ce87ea570358e4c25ee445929402a490
      https://github.com/llvm/llvm-project/commit/82a11e46ce87ea570358e4c25ee445929402a490
  Author: cor3ntin <corentinjabot at gmail.com>
  Date:   2024-09-10 (Tue, 10 Sep 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/SemaCXX/source_location.cpp

  Log Message:
  -----------
  [Clang] Workaround dependent source location issues (#106925)

In #78436 we made some SourceLocExpr dependent to
deal with the fact that their value should reflect the name of
specialized function - rather than the rtemplate in which they are first
used.

However SourceLocExpr are unusual in two ways
 - They don't depend on template arguments
- They morally depend on the context in which they are used (rather than
called from).

It's fair to say that this is quite novels and confuses clang. In
particular, in some cases, we used to create dependent SourceLocExpr and
never subsequently transform them, leaving dependent objects in
instantiated functions types. To work around that we avoid replacing
SourceLocExpr when we think they could remain dependent.
It's certainly not perfect but it fixes a number of reported bugs, and
seem to only affect scenarios in which the value of the SourceLocExpr
does not matter (overload resolution).

Fixes #106428
Fixes #81155
Fixes #80210
Fixes #85373

---------

Co-authored-by: Aaron Ballman <aaron at aaronballman.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list