[PATCH] D73708: [update_cc_test_checks] Don't attach CHECK lines to function declarations

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 02:54:35 PST 2020


arichardson marked 4 inline comments as done.
arichardson added inline comments.


================
Comment at: llvm/test/tools/UpdateTestChecks/update_cc_test_checks/def-and-decl.test:4
+# RUN: cp -f %S/Inputs/def-and-decl.c %t.c && %update_cc_test_checks %t.c
+# RUN: diff -u %S/Inputs/def-and-decl.c.expected %t.c
+## Check that re-running update_cc_test_checks doesn't change the output
----------------
MaskRay wrote:
> diff -u -> cmp
I prefer diff -u so that you get useful output on failure. It's using the lit-internal diff so it's portable.


================
Comment at: llvm/utils/update_cc_test_checks.py:80
+      # If there is no line it is probably a builtin function -> skip
+    if node.get('inner') is None:
+        common.debug('Skipping function without body:', node['name'], '@', node['loc'])
----------------
MaskRay wrote:
> Does `'inner' in node` work?
Yes, changed it. Thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73708





More information about the llvm-commits mailing list