[all-commits] [llvm/llvm-project] 250987: Use functions with prototypes when appropriate; NFC

Aaron Ballman via All-commits all-commits at lists.llvm.org
Wed Feb 9 06:12:06 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 25098736c1b6a716711a64fa45f7f34ccdbef6d1
      https://github.com/llvm/llvm-project/commit/25098736c1b6a716711a64fa45f7f34ccdbef6d1
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2022-02-09 (Wed, 09 Feb 2022)

  Changed paths:
    M clang/test/AST/ast-dump-decl-json.m
    M clang/test/AST/ast-dump-decl.m
    M clang/test/AST/ast-dump-openmp-barrier.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant-varying-return.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_1.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_10.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_11.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_12.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_13.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_2.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_3.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_4.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_5.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_6.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_7.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_8.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_9.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_addr_1.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_decl_1.c
    M clang/test/AST/ast-dump-openmp-begin-declare-variant_nested.c
    M clang/test/AST/ast-dump-openmp-cancel.c
    M clang/test/AST/ast-dump-openmp-cancellation-point.c
    M clang/test/AST/ast-dump-openmp-critical.c
    M clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c
    M clang/test/AST/ast-dump-openmp-declare-variant-extensions.c
    M clang/test/AST/ast-dump-openmp-flush.c
    M clang/test/AST/ast-dump-openmp-master.c
    M clang/test/AST/ast-dump-openmp-ordered.c
    M clang/test/AST/ast-dump-openmp-parallel-sections.c
    M clang/test/AST/ast-dump-openmp-parallel.c
    M clang/test/AST/ast-dump-openmp-section.c
    M clang/test/AST/ast-dump-openmp-sections.c
    M clang/test/AST/ast-dump-openmp-single.c
    M clang/test/AST/ast-dump-openmp-target-parallel.c
    M clang/test/AST/ast-dump-openmp-target-teams.c
    M clang/test/AST/ast-dump-openmp-target.c
    M clang/test/AST/ast-dump-openmp-task.c
    M clang/test/AST/ast-dump-openmp-taskgroup.c
    M clang/test/AST/ast-dump-openmp-taskwait.c
    M clang/test/AST/ast-dump-openmp-taskyield.c
    M clang/test/AST/ast-dump-openmp-teams.c
    M clang/test/AST/ast-dump-stmt.c
    M clang/test/AST/ast-dump-stmt.m
    M clang/test/AST/ast-print-bool.c
    M clang/test/AST/ast-print-enum-decl.c
    M clang/test/AST/ast-print-record-decl.c
    M clang/test/AST/attr-target-ast.c
    M clang/test/AST/finally-msvc.m
    M clang/test/AST/implicit-cast-dump.c
    M clang/test/AST/nrvo.c
    M clang/test/AST/pragma-attribute-objc-subject-match-rules.m
    M clang/test/ASTMerge/codegen-body/Inputs/body1.c
    M clang/test/ASTMerge/codegen-body/Inputs/body2.c
    M clang/test/ASTMerge/generic-selection-expr/Inputs/generic.c
    M clang/test/ASTMerge/macro/Inputs/macro1.m
    M clang/test/ASTMerge/macro/Inputs/macro2.m
    M clang/test/CodeCompletion/tag.c
    M clang/test/Coverage/html-multifile-diagnostics.c
    M clang/test/CoverageMapping/abspath.cpp
    M clang/test/CoverageMapping/block-storage-starts-region.m
    M clang/test/CoverageMapping/break.c
    M clang/test/CoverageMapping/builtinmacro.c
    M clang/test/CoverageMapping/casts.c
    M clang/test/CoverageMapping/comment-in-macro.c
    M clang/test/CoverageMapping/continue.c
    M clang/test/CoverageMapping/decl.c
    M clang/test/CoverageMapping/implicit-def-in-macro.m
    M clang/test/CoverageMapping/include-macros.c
    M clang/test/CoverageMapping/ir.c
    M clang/test/CoverageMapping/loopmacro.c
    M clang/test/CoverageMapping/macroception.c
    M clang/test/CoverageMapping/macroparams.c
    M clang/test/CoverageMapping/macroparams2.c
    M clang/test/CoverageMapping/macros.c
    M clang/test/CoverageMapping/preprocessor.c
    M clang/test/CoverageMapping/return.c
    M clang/test/CoverageMapping/switchmacro.c
    M clang/test/CoverageMapping/test.c
    M clang/test/CoverageMapping/unreachable-macro.c
    M clang/test/CoverageMapping/unused_names.c
    M clang/test/CoverageMapping/while.c
    M clang/test/Parser/namelookup-bug-2.c
    M clang/test/Parser/no-gnu-inline-asm.c
    M clang/test/Parser/objc-alias-printing.m
    M clang/test/Parser/objc-at-directive-fixit.m
    M clang/test/Parser/objc-available.m
    M clang/test/Parser/objc-boxing.m
    M clang/test/Parser/objc-class-property.m
    M clang/test/Parser/objc-foreach-syntax.m
    M clang/test/Parser/objc-init.m
    M clang/test/Parser/objc-messaging-1.m
    M clang/test/Parser/objc-messaging-neg-1.m
    M clang/test/Parser/objc-try-catch-1.m
    M clang/test/Parser/objc-type-printing.m
    M clang/test/Parser/pointer_promotion.c
    M clang/test/Parser/pragma-fenv_access-ms.c
    M clang/test/Parser/pragma-fenv_access.c
    M clang/test/Parser/recovery.c
    M clang/test/Parser/selector-1.m
    M clang/test/Parser/sizeof-missing-parens.c
    M clang/test/Parser/statements.c
    M clang/test/Parser/stmt-attributes.c
    M clang/test/Parser/stmt-attributes.m
    M clang/test/Parser/typeof.c
    M clang/test/Parser/types.c
    M clang/test/Parser/warn-misleading-indentation.cpp

  Log Message:
  -----------
  Use functions with prototypes when appropriate; NFC

A significant number of our tests in C accidentally use functions
without prototypes. This patch converts the function signatures to have
a prototype for the situations where the test is not specific to K&R C
declarations. e.g.,

  void func();

becomes

  void func(void);

This is the fifth batch of tests being updated (there are a significant
number of other tests left to be updated).

Note, the behavior of -ast-print is broken. It prints functions with a
prototype (void) as if they have no prototype () in C. Some tests need
to disable strict prototype checking when recompiling the results of an
-ast-print invocation.




More information about the All-commits mailing list