[all-commits] [llvm/llvm-project] bea5e8: [clang][Sema] Fix typo in checkBuiltinArgument helper

Alex Bradbury via All-commits all-commits at lists.llvm.org
Wed Apr 20 06:42:54 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bea5e88bcf5908b676da35fb8c64f9f8449ba73b
  Author: Alex Bradbury <asb at igalia.com>
  Date:   2022-04-20 (Wed, 20 Apr 2022)

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

  Log Message:
  [clang][Sema] Fix typo in checkBuiltinArgument helper

The checkBuiltinArgument helper takes an integer ArgIndex and is
documented as performing normal type-checking on that argument. However,
it mistakenly hardcodes the argument index to zero when retrieving the
argument from the call expression.

This hadn't been noticed previously as all in-tree uses typecheck the
0th argument anyway.

More information about the All-commits mailing list