[all-commits] [llvm/llvm-project] 0a6233: [clang][ASTImporter] Fix import of anonymous enums...

Balázs Kéri via All-commits all-commits at lists.llvm.org
Mon Jul 22 23:43:27 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0a6233a68c7b575d05bca0f0c708b7e97cc710d1
      https://github.com/llvm/llvm-project/commit/0a6233a68c7b575d05bca0f0c708b7e97cc710d1
  Author: Balázs Kéri <balazs.keri at ericsson.com>
  Date:   2024-07-23 (Tue, 23 Jul 2024)

  Changed paths:
    M clang/lib/AST/ASTImporter.cpp
    M clang/unittests/AST/ASTImporterTest.cpp

  Log Message:
  -----------
  [clang][ASTImporter] Fix import of anonymous enums if multiple are present (#99281)

After changes in PR #87144 and #93923 regressions appeared in some
cases. The problem was that if multiple anonymous enums are present in a
class and are imported as new the import of the second enum can fail
because it is detected as different from the first and causes ODR error.

Now in case of enums without name an existing similar enum is searched,
if not found the enum is imported. ODR error is not detected. This may
be incorrect if non-matching structures are imported, but this is the
less important case (import of matching classes is more important to
work).



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