summaryrefslogtreecommitdiff
path: root/clang/lib/AST/ODRHash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ODRHash.cpp')
-rw-r--r--clang/lib/AST/ODRHash.cpp49
1 files changed, 1 insertions, 48 deletions
diff --git a/clang/lib/AST/ODRHash.cpp b/clang/lib/AST/ODRHash.cpp
index 5b98646a1e8d..2dbc259138a8 100644
--- a/clang/lib/AST/ODRHash.cpp
+++ b/clang/lib/AST/ODRHash.cpp
@@ -745,55 +745,8 @@ void ODRHash::AddEnumDecl(const EnumDecl *Enum) {
if (Enum->isScoped())
AddBoolean(Enum->isScopedUsingClassTag());
- if (Enum->getIntegerTypeSourceInfo()) {
- // FIMXE: This allows two enums with different spellings to have the same
- // hash.
- //
- // // mod1.cppm
- // module;
- // extern "C" {
- // typedef unsigned __int64 size_t;
- // }
- // namespace std {
- // using :: size_t;
- // }
- //
- // extern "C++" {
- // namespace std {
- // enum class align_val_t : std::size_t {};
- // }
- // }
- //
- // export module mod1;
- // export using std::align_val_t;
- //
- // // mod2.cppm
- // module;
- // extern "C" {
- // typedef unsigned __int64 size_t;
- // }
- //
- // extern "C++" {
- // namespace std {
- // enum class align_val_t : size_t {};
- // }
- // }
- //
- // export module mod2;
- // import mod1;
- // export using std::align_val_t;
- //
- // The above example should be disallowed since it violates
- // [basic.def.odr]p14:
- //
- // Each such definition shall consist of the same sequence of tokens
- //
- // The definitions of `std::align_val_t` in two module units have different
- // spellings but we failed to give an error here.
- //
- // See https://github.com/llvm/llvm-project/issues/76638 for details.
+ if (Enum->getIntegerTypeSourceInfo())
AddQualType(Enum->getIntegerType().getCanonicalType());
- }
// Filter out sub-Decls which will not be processed in order to get an
// accurate count of Decl's.