aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorKrystian Stasiowski <sdkrystian@gmail.com>2024-05-15 18:55:53 -0400
committerGitHub <noreply@github.com>2024-05-15 18:55:53 -0400
commit667d12f86e626173726e87e101626a9060b8d967 (patch)
tree2dff1226a336fef1dc216b15a6d066d1c7f3db4b /flang/lib/Frontend/CompilerInvocation.cpp
parente00a3ccf43563209b71c5b68f56d83f4052dca63 (diff)
downloadllvm-667d12f86e626173726e87e101626a9060b8d967.zip
llvm-667d12f86e626173726e87e101626a9060b8d967.tar.gz
llvm-667d12f86e626173726e87e101626a9060b8d967.tar.bz2
[Clang][Sema] Do not mark template parameters in the exception specification as used during partial ordering (#91534)
We do not deduce template arguments from the exception specification when determining the primary template of a function template specialization or when taking the address of a function template. Therefore, this patch changes `isAtLeastAsSpecializedAs` such that we do not mark template parameters in the exception specification as 'used' during partial ordering (per [temp.deduct.partial] p12) to prevent the following from being ambiguous: ``` template<typename T, typename U> void f(U) noexcept(noexcept(T())); // #1 template<typename T> void f(T*) noexcept; // #2 template<> void f<int>(int*) noexcept; // currently ambiguous, selects #2 with this patch applied ``` Although there is no corresponding wording in the standard (see core issue filed here https://github.com/cplusplus/CWG/issues/537), this seems to be the intended behavior given the definition of _deduction substitution loci_ in [temp.deduct.general] p7 (and EDG does the same thing).
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions