-
- Downloads
[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.
Showing
- clang/docs/ReleaseNotes.rst 2 additions, 1 deletionclang/docs/ReleaseNotes.rst
- clang/docs/StandardCPlusPlusModules.rst 23 additions, 0 deletionsclang/docs/StandardCPlusPlusModules.rst
- clang/include/clang/Basic/LangOptions.def 1 addition, 0 deletionsclang/include/clang/Basic/LangOptions.def
- clang/include/clang/Driver/Options.td 8 additions, 0 deletionsclang/include/clang/Driver/Options.td
- clang/include/clang/Serialization/ASTReader.h 4 additions, 2 deletionsclang/include/clang/Serialization/ASTReader.h
- clang/lib/Driver/ToolChains/Clang.cpp 4 additions, 0 deletionsclang/lib/Driver/ToolChains/Clang.cpp
- clang/lib/Serialization/ASTReader.cpp 1 addition, 1 deletionclang/lib/Serialization/ASTReader.cpp
- clang/lib/Serialization/ASTReaderDecl.cpp 9 additions, 8 deletionsclang/lib/Serialization/ASTReaderDecl.cpp
- clang/lib/Serialization/ASTWriter.cpp 1 addition, 1 deletionclang/lib/Serialization/ASTWriter.cpp
- clang/lib/Serialization/ASTWriterDecl.cpp 4 additions, 4 deletionsclang/lib/Serialization/ASTWriterDecl.cpp
- clang/test/Driver/modules-skip-odr-check-in-gmf.cpp 10 additions, 0 deletionsclang/test/Driver/modules-skip-odr-check-in-gmf.cpp
- clang/test/Modules/concept.cppm 16 additions, 7 deletionsclang/test/Modules/concept.cppm
- clang/test/Modules/polluted-operator.cppm 15 additions, 3 deletionsclang/test/Modules/polluted-operator.cppm
- clang/test/Modules/pr76638.cppm 13 additions, 3 deletionsclang/test/Modules/pr76638.cppm
- clang/test/Modules/skip-odr-check-in-gmf.cppm 56 additions, 0 deletionsclang/test/Modules/skip-odr-check-in-gmf.cppm
Loading
Please register or sign in to comment