[PATCH] D100762: [clang][cli] Extract AST dump format into extra option

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 19 11:32:15 PDT 2021


dexonsmith requested changes to this revision.
dexonsmith added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/test/AST/ast-dump-comment-json.cpp:44
 // CHECK-NEXT:  "loc": {
-// CHECK-NEXT:   "offset": 72,
+// CHECK-NEXT:   "offset": 89,
 // CHECK-NEXT:   "line": 3,
----------------
This is a lot of noise in the tests just from changing `RUN` lines. Maybe these tests shouldn't be checking the `offset:` field.

I suggest:
1. Create (if it doesn't exist) one **small** test that checks that `offset:` works correctly. In the same commit, replace the `offset:` lines in all the other tests to check against `[[0-9+]],` instead of the specific character offset.
3. Land this change, which no longer needs to update all the `offset:` fields.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100762



More information about the cfe-commits mailing list