[PATCH] D119479: [clang][extract-api] Add global record support

Zixu Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 16 17:10:22 PDT 2022


zixuw added a comment.

@haowei I got a quick fix of completely purging the generator output in the test case. Could you take a look to have a sanity check before I land the fix on main?

  diff --git a/clang/test/SymbolGraph/global_record.c b/clang/test/SymbolGraph/global_record.c
  index ba4bf967e630..1e0294cda153 100644
  --- a/clang/test/SymbolGraph/global_record.c
  +++ b/clang/test/SymbolGraph/global_record.c
  @@ -4,7 +4,9 @@
   // RUN: %t/reference.output.json
   // RUN: %clang -extract-api -target arm64-apple-macosx \
   // RUN: %t/input.c -o %t/output.json | FileCheck -allow-empty %s
  -// RUN: sed -e "s@\"generator\": \"clang.*\"@\"generator\": \"clang\"@g" \
  +
  +// Generator version is not consisten across test runs, normalize it.
  +// RUN: sed -e "s@\"generator\": \".*\"@\"generator\": \"?\"@g" \
   // RUN: %t/output.json >> %t/output-normalized.json
   // RUN: diff %t/reference.output.json %t/output-normalized.json
   
  @@ -32,7 +34,7 @@ char unavailable __attribute__((unavailable));
         "minor": 5,
         "patch": 3
       },
  -    "generator": "clang"
  +    "generator": "?"
     },
     "module": {
       "name": "",


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119479/new/

https://reviews.llvm.org/D119479



More information about the cfe-commits mailing list