[all-commits] [llvm/llvm-project] 5b6bfe: [Clang][OpenMP] Use the list item location as poin...
Akash Manna via All-commits
all-commits at lists.llvm.org
Thu Sep 24 04:08:49 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5b6bfedc496ded375231a5afebe5d0f27821b7f2
https://github.com/llvm/llvm-project/commit/5b6bfedc496ded375231a5afebe5d0f27821b7f2
Author: Akash Manna <akash.manna.mymail at gmail.com>
Date: 2026-09-24 (Thu, 24 Sep 2026)
Changed paths:
M clang/docs/ReleaseNotes.md
M clang/lib/Sema/SemaOpenMP.cpp
A clang/test/OpenMP/gh154704.cpp
Log Message:
-----------
[Clang][OpenMP] Use the list item location as point of instantiation in mapper lookup (#225604)
Fixes #154704
When a variable is implicitly mapped on `#pragma omp target`, Clang
looks for a user-defined mapper for its type through ADL, and ADL may
have to instantiate class template specializations named by the type's
template arguments (for `std::map<int, int>` that's its allocator).
Implicit map clauses carry no source location by design, and the
"default" mapper id was stamped with that empty location, so the
instantiation was recorded with an invalid point of instantiation and
`setPointOfInstantiation` asserted.
`buildUserDefinedMapperRef` now takes the location of the mapped list
item and uses it for the ADL and the derived-class checks, which is what
the other default-mapper lookups in `SemaOpenMP.cpp` already did.
Diagnostics about the mapper id and the mapper reference itself keep the
mapper-id location, so explicit `mapper(id)` behavior is unchanged. The
instantiation is now attributed to the mapped variable inside the
region, which is also where the "in instantiation requested here" note
points.
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