aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2022-07-12 23:47:37 +0800
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>2022-07-12 23:57:44 +0800
commitf6b0ae144ed8085618c12ba83d95affd786e6a49 (patch)
tree2d25458f07617c9267a6e4eebf4ea551654a1077 /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
parent5d41fe07688048a202f2b07a60100f393407436b (diff)
downloadllvm-f6b0ae144ed8085618c12ba83d95affd786e6a49.zip
llvm-f6b0ae144ed8085618c12ba83d95affd786e6a49.tar.gz
llvm-f6b0ae144ed8085618c12ba83d95affd786e6a49.tar.bz2
[AST] Accept identical TypeConstraint referring to other template
parameters. The current implementation to judge the similarity of TypeConstraint in ASTContext::isSameTemplateParameter is problematic, it couldn't handle the following case: ```C++ template <__integer_like _Tp, C<_Tp> Sentinel> constexpr _Tp operator()(_Tp &&__t, Sentinel &&last) const { return __t; } ``` When we see 2 such declarations from different modules, we would judge their similarity by `ASTContext::isSame*` methods. But problems come for the TypeConstraint. Originally, we would profile each argument one by one. But it is not right. Since the profiling result of `_Tp` would refer to two different template type declarations. So it would get different results. It is right since the `_Tp` in different modules refers to different declarations indeed. So the same declaration in different modules would meet incorrect our-checking results. It is not the thing we want. We want to know if the TypeConstraint have the same expression. Reviewer: vsapsai, ilya-biryukov Differential Revision: https://reviews.llvm.org/D129068
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions