[all-commits] [llvm/llvm-project] deb057: [flang] Enclose Walk overloads into class for look...

Krzysztof Parzyszek via All-commits all-commits at lists.llvm.org
Wed Nov 13 05:15:41 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: deb057adb7334734482452daf20ccdd8cece1aa8
      https://github.com/llvm/llvm-project/commit/deb057adb7334734482452daf20ccdd8cece1aa8
  Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
  Date:   2024-11-13 (Wed, 13 Nov 2024)

  Changed paths:
    M flang/include/flang/Parser/parse-tree-visitor.h

  Log Message:
  -----------
  [flang] Enclose Walk overloads into class for lookup purposes (#115926)

The parse-tree-visitor consists of a range of `Walk` functions where
each overload is specialized for a particular case. These overloads do
call one another, and due to the usual name lookup rules, an earlier
overload can't call an overload defined later unless the latter was
declared ahead of time.
To avoid listing a number of declarations at the beginning of the header
enclose them in a class as static members, with a couple of simple
forwarding calls. This takes advantage of the class member name lookup,
which uses the entire class definition for lookup.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list