[all-commits] [llvm/llvm-project] 4be105: Silence some false positive -Wstrict-prototype war...

Aaron Ballman via All-commits all-commits at lists.llvm.org
Fri May 13 05:32:10 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4be105c98a9c7e083cd878ee1751e11160b97b4a
      https://github.com/llvm/llvm-project/commit/4be105c98a9c7e083cd878ee1751e11160b97b4a
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2022-05-13 (Fri, 13 May 2022)

  Changed paths:
    M clang/lib/Sema/SemaType.cpp
    M clang/test/Parser/opencl-kernel.cl
    M clang/test/Sema/block-return.c
    M clang/test/Sema/warn-strict-prototypes.m
    M clang/test/SemaOpenCL/address-spaces.cl
    M clang/test/SemaOpenCL/cl20-device-side-enqueue.cl
    M clang/test/SemaOpenCL/func.cl

  Log Message:
  -----------
  Silence some false positive -Wstrict-prototype warnings

Before issuing the warning about use of a strict prototype, check if
the declarator is required to have a prototype through some other means
determined at parse time.

This silences false positives in OpenCL code (where the functions are
forced to have a prototype) and block literal expressions.




More information about the All-commits mailing list