[all-commits] [llvm/llvm-project] a0e1cc: [C++20] [Modules] Don't perform ODR checks in GMF
Chuanqi Xu via All-commits
all-commits at lists.llvm.org
Tue Feb 6 21:31:53 PST 2024
Branch: refs/heads/release/18.x
Home: https://github.com/llvm/llvm-project
Commit: a0e1cc0aefbc879cb2861003e487576e9a6b3c93
https://github.com/llvm/llvm-project/commit/a0e1cc0aefbc879cb2861003e487576e9a6b3c93
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2024-02-06 (Tue, 06 Feb 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Serialization/ASTReader.h
M clang/lib/Serialization/ASTReader.cpp
M clang/lib/Serialization/ASTReaderDecl.cpp
M clang/lib/Serialization/ASTWriter.cpp
M clang/lib/Serialization/ASTWriterDecl.cpp
M clang/test/Modules/concept.cppm
M clang/test/Modules/no-eager-load.cppm
M clang/test/Modules/polluted-operator.cppm
M clang/test/Modules/pr76638.cppm
Log Message:
-----------
[C++20] [Modules] Don't perform ODR checks in GMF
Close https://github.com/llvm/llvm-project/issues/79240.
See the linked issue for details. Given the frequency of issue reporting
about false positive ODR checks (I received private issue reports too),
I'd like to backport this to 18.x too.
Commit: 70195e0d67080c2d0d1f321db69ebb40042a1c7a
https://github.com/llvm/llvm-project/commit/70195e0d67080c2d0d1f321db69ebb40042a1c7a
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2024-02-06 (Tue, 06 Feb 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/AST/ODRHash.cpp
A clang/test/Modules/cxx20-modules-enum-odr.cppm
Log Message:
-----------
[C++20] [Modules] Remove previous workaround for odr hashing enums
Previosly we land
https://github.com/llvm/llvm-project/commit/085eae6b863881fb9fda323e5b672b04a00ed19e
to workaround the false positive ODR violations in
https://github.com/llvm/llvm-project/issues/76638.
However, we decided to not perform ODR checks for decls from GMF in
https://github.com/llvm/llvm-project/issues/79240 and we land the
corresponding change. So we should be able to remove the workaround now.
The original tests get remained.
Commit: c6c86965d967886ca5a2ed8968c949cd42cdd49a
https://github.com/llvm/llvm-project/commit/c6c86965d967886ca5a2ed8968c949cd42cdd49a
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2024-02-06 (Tue, 06 Feb 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/docs/StandardCPlusPlusModules.rst
M clang/include/clang/Basic/LangOptions.def
M clang/include/clang/Driver/Options.td
M clang/include/clang/Serialization/ASTReader.h
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/lib/Serialization/ASTReader.cpp
M clang/lib/Serialization/ASTReaderDecl.cpp
M clang/lib/Serialization/ASTWriter.cpp
M clang/lib/Serialization/ASTWriterDecl.cpp
A clang/test/Driver/modules-skip-odr-check-in-gmf.cpp
M clang/test/Modules/concept.cppm
M clang/test/Modules/polluted-operator.cppm
M clang/test/Modules/pr76638.cppm
A clang/test/Modules/skip-odr-check-in-gmf.cppm
Log Message:
-----------
[C++20] [Modules] Introduce -fskip-odr-check-in-gmf (#79959)
Close https://github.com/llvm/llvm-project/issues/79240
Cite the comment from @mizvekov in
//github.com/llvm/llvm-project/issues/79240:
> There are two kinds of bugs / issues relevant here:
>
> Clang bugs that this change hides
> Here we can add a Frontend flag that disables the GMF ODR check, just
> so
> we can keep tracking, testing and fixing these issues.
> The Driver would just always pass that flag.
> We could add that flag in this current issue.
> Bugs in user code:
> I don't think it's worth adding a corresponding Driver flag for
> controlling the above Frontend flag, since we intend it's behavior to
> become default as we fix the problems, and users interested in testing
> the more strict behavior can just use the Frontend flag directly.
This patch follows the suggestion:
- Introduce the CC1 flag `-fskip-odr-check-in-gmf` which is by default
off, so that the every existing test will still be tested with checking
ODR violations.
- Passing `-fskip-odr-check-in-gmf` in the driver to keep the behavior
we intended.
- Edit the document to tell the users who are still interested in more
strict checks can use `-Xclang -fno-skip-odr-check-in-gmf` to get the
existing behavior.
Compare: https://github.com/llvm/llvm-project/compare/a9a790e0e2a1...c6c86965d967
More information about the All-commits
mailing list