[all-commits] [llvm/llvm-project] fec471: [clang] Use getDefaultArgRange instead of getDefau...

Haojian Wu via All-commits all-commits at lists.llvm.org
Wed Mar 6 06:55:54 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fec471649fffaa3ec44e17801e5c9605825e58bb
      https://github.com/llvm/llvm-project/commit/fec471649fffaa3ec44e17801e5c9605825e58bb
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2024-03-06 (Wed, 06 Mar 2024)

  Changed paths:
    M clang/lib/Sema/SemaTemplate.cpp

  Log Message:
  -----------
  [clang] Use getDefaultArgRange instead of getDefaultArg to retrieve the (#79296)

source location in` AliasTemplateDeductionGuideTransform`.

I don't have a reproducible testcase, but this should be a safe and
non-functional change. We have checked the `hasDefaultArg` before
calling `getDefaultArg()`, but `hasDefaultArg` allows
unparsed/uninstantiated default arg which is prohibited in
`getDefaultArg()`.

Since we're only interested in the source location, we switch to use
`getDefaultArgRange()` API.



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