[clang] [Clang][Sema] Explicit template arguments are not substituted into the exception specification of a function (PR #90760)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 1 11:57:10 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 7cbaaed63612fe6446355c5ffe33ddd57578b929 2bc18f45560f607a09c756bb9ebca0b7ad5d1bb4 -- clang/test/CXX/temp/temp.deduct/p7.cpp clang/lib/Sema/SemaInit.cpp clang/lib/Sema/SemaTemplateDeduction.cpp clang/test/CXX/drs/dr13xx.cpp clang/test/SemaCXX/cxx1z-noexcept-function-type.cpp clang/test/SemaTemplate/temp_arg_type.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 2c1c7affbc..c8049ae581 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -6578,8 +6578,10 @@ void InitializationSequence::InitializeFrom(Sema &S,
} else if (ICS.isBad()) {
if (isLibstdcxxPointerReturnFalseHack(S, Entity, Initializer))
AddZeroInitializationStep(Entity.getType());
- else if (DeclAccessPair Found; Initializer->getType() == Context.OverloadTy &&
- !S.ResolveAddressOfOverloadedFunction(Initializer, DestType, /*Complain=*/false, Found))
+ else if (DeclAccessPair Found;
+ Initializer->getType() == Context.OverloadTy &&
+ !S.ResolveAddressOfOverloadedFunction(Initializer, DestType,
+ /*Complain=*/false, Found))
SetFailed(InitializationSequence::FK_AddressOfOverloadFailed);
else if (Initializer->getType()->isFunctionType() &&
isExprAnUnaddressableFunction(S, Initializer))
@@ -9654,8 +9656,10 @@ bool InitializationSequence::Diagnose(Sema &S,
if (OnlyArg->getType() == S.Context.OverloadTy) {
DeclAccessPair Found;
if (FunctionDecl *FD = S.ResolveAddressOfOverloadedFunction(
- OnlyArg, DestType.getNonReferenceType(), /*Complain=*/false, Found)) {
- if (Expr *Resolved = S.FixOverloadedFunctionReference(OnlyArg, Found, FD).get())
+ OnlyArg, DestType.getNonReferenceType(), /*Complain=*/false,
+ Found)) {
+ if (Expr *Resolved =
+ S.FixOverloadedFunctionReference(OnlyArg, Found, FD).get())
OnlyArg = Resolved;
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/90760
More information about the cfe-commits
mailing list