[all-commits] [llvm/llvm-project] e50ec3: [Clang][Sema] Expose static inline functions from ...
Jan Kokemüller via All-commits
all-commits at lists.llvm.org
Mon Dec 30 17:53:51 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e50ec3e46bea819a1d7aea1cee2d7e11197bbdd2
https://github.com/llvm/llvm-project/commit/e50ec3e46bea819a1d7aea1cee2d7e11197bbdd2
Author: Jan Kokemüller <jan.kokemueller at gmail.com>
Date: 2024-12-31 (Tue, 31 Dec 2024)
Changed paths:
M clang/lib/Sema/SemaOverload.cpp
A clang/test/Modules/expose-static-inline-from-gmf-1.cppm
A clang/test/Modules/expose-static-inline-from-gmf-2.cppm
A clang/test/Modules/expose-static-inline-from-gmf-3.cppm
A clang/test/Modules/expose-static-inline-from-gmf-4.cppm
A clang/test/Modules/expose-static-inline-from-gmf-5.cppm
Log Message:
-----------
[Clang][Sema] Expose static inline functions from GMF (#104701)
In C, it is a common pattern to have `static inline` functions in
headers to avoid ODR issues. Currently, when those headers are included
in a GMF, the names are not found when two-phase name lookup and ADL is
involved. Those names are removed by `Sema::AddOverloadCandidate`.
Similarly, in C++, sometimes people use templates with internal linkage
in headers.
As the GMF was designed to be a transitional mechanism for headers,
special case those functions in `Sema::AddOverloadCandidate`.
This fixes <https://github.com/llvm/llvm-project/issues/98021>.
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