aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaExceptionSpec.cpp
diff options
context:
space:
mode:
authorPiJoules <6019989+PiJoules@users.noreply.github.com>2025-05-09 10:19:52 -0700
committerGitHub <noreply@github.com>2025-05-09 10:19:52 -0700
commita6385a87a2e5537f0790494ebe8bb4c3cc9506b9 (patch)
tree3fd7721b1d55f3ceb2560f84aee578129830d9ed /clang/lib/Sema/SemaExceptionSpec.cpp
parentc8539f7269d3ecb1246b7081378f694938ebbbf4 (diff)
downloadllvm-a6385a87a2e5537f0790494ebe8bb4c3cc9506b9.zip
llvm-a6385a87a2e5537f0790494ebe8bb4c3cc9506b9.tar.gz
llvm-a6385a87a2e5537f0790494ebe8bb4c3cc9506b9.tar.bz2
[Sema] Refactor IsFunctionConversion (#139172)
A bunch of uses of IsFunctionConversion don't use the third argument and just make a dummy QualType to pass. This splits IsFunctionConversion into 2 functions, one that just takes 2 arguments and does the check, and one that does the actual conversion using the 3rd argument. Both functions can be const and replace current uses appropriately.
Diffstat (limited to 'clang/lib/Sema/SemaExceptionSpec.cpp')
-rw-r--r--clang/lib/Sema/SemaExceptionSpec.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExceptionSpec.cpp b/clang/lib/Sema/SemaExceptionSpec.cpp
index aaa2bb2..c83eab5 100644
--- a/clang/lib/Sema/SemaExceptionSpec.cpp
+++ b/clang/lib/Sema/SemaExceptionSpec.cpp
@@ -700,12 +700,11 @@ bool Sema::handlerCanCatch(QualType HandlerType, QualType ExceptionType) {
// -- a qualification conversion
// -- a function pointer conversion
bool LifetimeConv;
- QualType Result;
// FIXME: Should we treat the exception as catchable if a lifetime
// conversion is required?
if (IsQualificationConversion(ExceptionType, HandlerType, false,
LifetimeConv) ||
- IsFunctionConversion(ExceptionType, HandlerType, Result))
+ IsFunctionConversion(ExceptionType, HandlerType))
return true;
// -- a standard pointer conversion [...]