[all-commits] [llvm/llvm-project] c4b13f: [clang][deps] Simplify PREFIX definitions in tests

Jan Svoboda via All-commits all-commits at lists.llvm.org
Sat Mar 12 07:45:22 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c4b13f7a2f7f74006f2436ef431093d13d94f1f3
      https://github.com/llvm/llvm-project/commit/c4b13f7a2f7f74006f2436ef431093d13d94f1f3
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2022-03-12 (Sat, 12 Mar 2022)

  Changed paths:
    M clang/test/ClangScanDeps/diagnostics.c
    M clang/test/ClangScanDeps/modules-context-hash.c
    M clang/test/ClangScanDeps/modules-fmodule-name-no-module-built.m
    M clang/test/ClangScanDeps/modules-full-by-mod-name.cpp
    M clang/test/ClangScanDeps/modules-full.cpp
    M clang/test/ClangScanDeps/modules-inferred.m
    M clang/test/ClangScanDeps/modules-pch-common-submodule.c
    M clang/test/ClangScanDeps/modules-pch-common-via-submodule.c
    M clang/test/ClangScanDeps/modules-pch.c
    M clang/test/ClangScanDeps/preserved-args.c
    M clang/test/ClangScanDeps/removed-args.c

  Log Message:
  -----------
  [clang][deps] Simplify PREFIX definitions in tests

Instead of outputting the test directory into the JSON result file, parsing it with `FileCheck` and then potentially stripping it, simply use `FileCheck`'s `-D` option.

Note that we use `%/t` instead of `%t` in order to normalize to forward slashes on Windows, which matches what we do with `sed 's:\\\\\?:/:g'`.

Differential Revision: https://reviews.llvm.org/D121516




More information about the All-commits mailing list