aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>2025-03-28 08:17:31 -0500
committerGitHub <noreply@github.com>2025-03-28 08:17:31 -0500
commit33cd00f8c82d5df45b1dfd59310929a4d315fd8e (patch)
tree13c5cdadf514a57dfd6878c2478784ec06a23a00 /clang/lib/Frontend/CompilerInvocation.cpp
parenta481452cd88acc180f82dd5631257c8954ed7812 (diff)
downloadllvm-33cd00f8c82d5df45b1dfd59310929a4d315fd8e.zip
llvm-33cd00f8c82d5df45b1dfd59310929a4d315fd8e.tar.gz
llvm-33cd00f8c82d5df45b1dfd59310929a4d315fd8e.tar.bz2
[flang] Use more generic overload for Operation in Traverse (#133305)
Currently there are two specific overloads: for unary operations, i.e. `Operation<D, R, O>`, and binary ones `Operation<D, R, LO, RO>`. This makes it impossible for a derived class to use a single overload to handle all types of operations: `Operation<D, R, O...>`. Since the base overloads need to be included in the derived class's scope, via `using Base::operator()` either one of the specific overloads will always be a better candidate than the more generic derived one. ``` class MyVisitor : public Traverse<...> { using Traverse<...>::operator(); template <typename D, typename R, typename... O> Result operator()(const Operation<D, R, O...> &op) const { // Will never be used. } }; ``` This patch replaces the two specific overloads for Operation in Traverse with a single generic overload, while preserving the existing functionality, and allowing derived classes to use a single overload as well.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions