Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Modules] Incorrect ODR detection for unresolved using type
Implement `getUnresolvedUsingType()` and don't create a new `UnresolvedUsingType` when there is already canonical declaration. This solved an incorrect ODR detection in modules for uresolved using type. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D115792
- Loading branch information
1 parent
ae6961d
commit c50a4b3
Showing
6 changed files
with
42 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module; | ||
#include "foo.h" | ||
export module X; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
template <class T> | ||
struct bar { | ||
using Ty = int; | ||
}; | ||
template <class T> | ||
struct foo : public bar<T> { | ||
using typename bar<T>::Ty; | ||
void baz(Ty); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// RUN: rm -rf %t | ||
// RUN: mkdir -p %t | ||
// RUN: %clang -std=c++20 %S/Inputs/odr_using_dependent_name/X.cppm --precompile -o %t/X.pcm | ||
// RUN: %clang -std=c++20 -I%S/Inputs/odr_using_dependent_name -fprebuilt-module-path=%t %s --precompile -c | ||
// expected-no-diagnostics | ||
module; | ||
#include "foo.h" | ||
export module Y; | ||
import X; |