[all-commits] [llvm/llvm-project] 51dfe2: [clang] odr-checker fix for conversion operators (...
Matheus Izvekov via All-commits
all-commits at lists.llvm.org
Mon Jun 30 06:19:50 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 51dfe28f8754417dbd367150792116324881f496
https://github.com/llvm/llvm-project/commit/51dfe28f8754417dbd367150792116324881f496
Author: Matheus Izvekov <mizvekov at gmail.com>
Date: 2025-06-30 (Mon, 30 Jun 2025)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/AST/ODRHash.h
M clang/lib/AST/ODRHash.cpp
M clang/test/Modules/odr_hash.cpp
Log Message:
-----------
[clang] odr-checker fix for conversion operators (#146153)
This fixes an issue with the ODR checker not using the as-written type
of conversion operators.
The odr-checker in general should not have to deal with canonical types,
as its purpose is to compare same definitions across TUs, and these need
to be same as written, with few exceptions.
Using canonical types is specially problematic when expressions are
involved, as the types which refer to them generally pick an arbitrary
representative expression, and this can lead to false mismatches.
This patch makes sure that when hashing the names of declarations, if a
DeclarationNameInfo is available, its type source info is used, instead
of the type contained in the DeclarationName, which otherwise is always
canonical.
This patch supersedes #144796, as it fixes the problem without weakening
the ODR checker.
Fixes https://github.com/llvm/llvm-project/issues/143152
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