[libc-commits] [PATCH] D77861: [libc] Add cmake target for linting libc.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Apr 15 12:04:01 PDT 2020


sivachandra accepted this revision.
sivachandra added a comment.
This revision is now accepted and ready to land.

LGTM. Minor comments inline.



================
Comment at: libc/cmake/modules/LLVMLibCRules.cmake:352
+  if(LLVM_ENABLE_LINTING)
+    set(lint_timestamp "${CMAKE_CURRENT_BINARY_DIR}/${target_name}.linted")
+
----------------
Make the prefix `.__lint_timestamp__` to make it absolutely clear it is internal.


================
Comment at: libc/cmake/modules/LLVMLibCRules.cmake:364
+      COMMAND $<TARGET_FILE:clang-tidy> "--extra-arg=-fno-caret-diagnostics" --quiet
+      # Path to directory containing compile_commands.json
+              -p ${PROJECT_BINARY_DIR}
----------------
Nit: Put this comment at the end of the line below or align with the indentation below.


================
Comment at: libc/cmake/modules/LLVMLibCRules.cmake:380
+    add_custom_target(${fq_target_name}.__lint__
+      DEPENDS ${lint_dummy})
+    add_dependencies(lint-libc ${fq_target_name}.__lint__)
----------------
s/`lint_dummy`/`lint_timestamp` ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77861





More information about the libc-commits mailing list