-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[Sema] Compare canonical conversion function #154158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,143 @@ | ||
// RUN: rm -rf %t | ||
hahnjo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// RUN: mkdir -p %t | ||
// RUN: split-file %s %t | ||
// | ||
// RUN: %clang_cc1 -xc++ -std=c++20 -emit-module -fmodule-name=hf -fno-cxx-modules -fmodules -fno-implicit-modules %t/CMO.cppmap -o %t/WI9.pcm | ||
// RUN: %clang_cc1 -xc++ -std=c++20 -emit-module -fmodule-name=g -fno-cxx-modules -fmodules -fno-implicit-modules -fmodule-file=%t/WI9.pcm %t/E6H.cppmap -o %t/4BK.pcm | ||
// RUN: %clang_cc1 -xc++ -std=c++20 -emit-module -fmodule-name=r -fno-cxx-modules -fmodules -fno-implicit-modules -fmodule-file=%t/WI9.pcm %t/HMT.cppmap -o %t/LUM.pcm | ||
// RUN: %clang_cc1 -xc++ -std=c++20 -emit-module -fmodule-name=q -fno-cxx-modules -fmodules -fno-implicit-modules -fmodule-file=%t/LUM.pcm -fmodule-file=%t/4BK.pcm %t/JOV.cppmap -o %t/9VX.pcm | ||
// RUN: %clang_cc1 -xc++ -std=c++20 -verify -fsyntax-only -fno-cxx-modules -fmodules -fno-implicit-modules -fmodule-file=%t/9VX.pcm %t/XFD.cc | ||
|
||
//--- 2OT.h | ||
#include "LQ1.h" | ||
|
||
namespace ciy { | ||
namespace xqk { | ||
template <typename> | ||
class vum { | ||
public: | ||
using sc = std::C::wmd; | ||
friend bool operator==(vum, vum); | ||
}; | ||
template <typename> | ||
class me { | ||
public: | ||
using vbh = vum<me>; | ||
using sc = std::C::vy<vbh>::sc; | ||
template <typename db> | ||
operator db() { return {}; } | ||
}; | ||
} // namespace xqk | ||
template <typename vus> | ||
xqk::me<vus> uvo(std::C::wmd, vus); | ||
} // namespace ciy | ||
|
||
class ua { | ||
std::C::wmd kij() { | ||
ciy::uvo(kij(), '-'); | ||
return {}; | ||
} | ||
}; | ||
|
||
//--- 9KF.h | ||
#include "LQ1.h" | ||
#include "2OT.h" | ||
namespace { | ||
void al(std::C::wmd lou) { std::C::jv<std::C::wmd> yt = ciy::uvo(lou, '/'); } | ||
} // namespace | ||
|
||
//--- CMO.cppmap | ||
module "hf" { | ||
header "LQ1.h" | ||
} | ||
|
||
|
||
//--- E6H.cppmap | ||
module "g" { | ||
export * | ||
header "2OT.h" | ||
} | ||
|
||
|
||
//--- HMT.cppmap | ||
module "r" { | ||
header "2OT.h" | ||
} | ||
|
||
|
||
//--- JOV.cppmap | ||
module "q" { | ||
header "9KF.h" | ||
} | ||
|
||
|
||
//--- LQ1.h | ||
namespace std { | ||
namespace C { | ||
template <class zd> | ||
struct vy : zd {}; | ||
template <class ub> | ||
struct vy<ub*> { | ||
typedef ub jz; | ||
}; | ||
struct wmd {}; | ||
template <class uo, class zt> | ||
void sk(uo k, zt gf) { | ||
(void)(k != gf); | ||
} | ||
template <class uo> | ||
class fm { | ||
public: | ||
fm(uo); | ||
}; | ||
template <class kj, class kju> | ||
bool operator==(kj, kju); | ||
template <class epn> | ||
void afm(epn) { | ||
using yp = vy<epn>; | ||
if (__is_trivially_copyable(yp)) { | ||
sk(fm(epn()), nullptr); | ||
} | ||
} | ||
template <class ub> | ||
class jv { | ||
public: | ||
constexpr void gq(); | ||
ub *nef; | ||
}; | ||
template <class ub> | ||
constexpr void jv<ub>::gq() { | ||
afm(nef); | ||
} | ||
} // namespace C | ||
} // namespace std | ||
namespace ciy { | ||
} // namespace ciy | ||
|
||
//--- XFD.cc | ||
// expected-no-diagnostics | ||
#include "LQ1.h" | ||
#include "2OT.h" | ||
class wiy { | ||
public: | ||
std::C::wmd eyb(); | ||
}; | ||
template <typename wpa> | ||
void i(wpa fg) { | ||
std::C::jv<std::C::wmd> zs; | ||
zs = ciy::uvo(fg.eyb(), '\n'); | ||
} | ||
namespace ciy { | ||
namespace xqk { | ||
struct sbv; | ||
std::C::jv<sbv> ns() { | ||
std::C::jv<sbv> ubs; | ||
ubs.gq(); | ||
return ubs; | ||
} | ||
} // namespace xqk | ||
} // namespace ciy | ||
void s() { | ||
wiy fg; | ||
i(fg); | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.