[all-commits] [llvm/llvm-project] 86b5ea: Allow parameter names to be elided in a function d...

AaronBallman via All-commits all-commits at lists.llvm.org
Tue Apr 7 11:44:53 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 86b5eabfeab164dcb680f6690e7718e3d21ceeb5
      https://github.com/llvm/llvm-project/commit/86b5eabfeab164dcb680f6690e7718e3d21ceeb5
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2020-04-07 (Tue, 07 Apr 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaChecking.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/Sema/block-args.c
    M clang/test/Sema/c89.c
    M clang/test/Sema/function.c

  Log Message:
  -----------
  Allow parameter names to be elided in a function definition in C.

WG14 has adopted N2480 (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2480.pdf)
into C2x at the meetings last week, allowing parameter names of a function
definition to be elided. This patch relaxes the error so that C++ and C2x do not
diagnose this situation, and modes before C2x will allow it as an extension.

This also adds the same feature to ObjC blocks under the assumption that ObjC
wishes to follow the C standard in this regard.




More information about the All-commits mailing list