[PATCH] D59838: gn build: Add build files for clang-include-fixer and find-all-symbols

2019-03-26 Thread Mirko Bonadei via Phabricator via cfe-commits
mbonadei accepted this revision.
mbonadei added a comment.
This revision is now accepted and ready to land.

LGTM.


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

https://reviews.llvm.org/D59838



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D59899: gn build: Add some build files for clangd

2019-03-28 Thread Mirko Bonadei via Phabricator via cfe-commits
mbonadei accepted this revision.
mbonadei added a comment.
This revision is now accepted and ready to land.

Sorry for the delay, LGTM % 2 small comments.




Comment at: 
llvm/utils/gn/secondary/clang-tools-extra/clang-apply-replacements/BUILD.gn:2
 static_library("clang-apply-replacements") {
+  output_name = "clangApplyReplacements"
   configs += [ "//llvm/utils/gn/build:clang_code" ]

Oh, I forgot to add this! Thanks!



Comment at: llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn:32
+"//clang/lib/Serialization",
+"//clang/lib/Tooling/Core",
+"//clang/lib/Tooling/Inclusions",

Missing //clang/lib/Tooling ?



Comment at: 
llvm/utils/gn/secondary/clang-tools-extra/clangd/refactor/tweaks/BUILD.gn:7
+  configs += [ "//llvm/utils/gn/build:clang_code" ]
+  deps = [
+"//clang-tools-extra/clangd",

Missing "//llvm/lib/Support"?

Probably it is ok, since it is a `source_set`, but am I following the 1:1 
matching rule.



Comment at: llvm/utils/gn/secondary/clang-tools-extra/clangd/tool/BUILD.gn:9
+write_cmake_config("features") {
+  # FIXME: Try moving Features.inc.in to tools, seems like a better location.
+  input = "../Features.inc.in"

+1, if that is not possible this target should be in clangd/BUILD.gn (it is 
more natural).


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

https://reviews.llvm.org/D59899



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D59955: gn build: Add check-clang-tools to run clang-tools-extra lit tests

2019-03-28 Thread Mirko Bonadei via Phabricator via cfe-commits
mbonadei accepted this revision.
mbonadei added a comment.
This revision is now accepted and ready to land.

Really nice work!

LGTM (also patched locally and tested).


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

https://reviews.llvm.org/D59955



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D60038: gn build: Add build files for most clang-tools-extra unit tests

2019-03-31 Thread Mirko Bonadei via Phabricator via cfe-commits
mbonadei accepted this revision.
mbonadei added a comment.
This revision is now accepted and ready to land.

LGTM, just a small style comment.




Comment at: 
llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-apply-replacements/BUILD.gn:3
+
+unittest("ClangApplyReplacementsTests") {
+  configs += [ "//llvm/utils/gn/build:clang_code" ]

Why don't we use `output_name` here as well? It seems to be available for 
executables 
(https://gn.googlesource.com/gn/+/master/docs/reference.md#target-declarations-executable_declare-an-executable-target-variables).
 The current style seems to be lisp-case for target names and have 
`output_name` matching the cmake build.


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

https://reviews.llvm.org/D60038



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D60124: gn build: Add build files for non-framework xpc clangd bits

2019-04-02 Thread Mirko Bonadei via Phabricator via cfe-commits
mbonadei accepted this revision.
mbonadei added a comment.
This revision is now accepted and ready to land.

LGTM, just a couple of comments.




Comment at: llvm/utils/gn/secondary/clang-tools-extra/clangd/xpc/BUILD.gn:17
+  configs += [ "//llvm/utils/gn/build:clang_code" ]
+  deps = [
+"//clang-tools-extra/clangd",

Missing ":conversions" in deps.



Comment at: llvm/utils/gn/secondary/clang-tools-extra/clangd/xpc/enable.gni:3
+  # Whether to build clangd's XPC components.
+  clangd_build_xpc = current_os == "mac"
+}

Is it ok to keep this ` = current_os == "mac"`, from the CL description I had 
the feeling that xpc tests were still disabled.


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

https://reviews.llvm.org/D60124



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D60130: gn build: Add build files for clangd xpc framework code

2019-04-03 Thread Mirko Bonadei via Phabricator via cfe-commits
mbonadei accepted this revision.
mbonadei added a comment.
This revision is now accepted and ready to land.

Really nice work and thanks for the thread on gn-dev about create_bundle!

LGTM!


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

https://reviews.llvm.org/D60130



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D65462: gn build: Fix check-clang-tools after r362702.

2019-07-30 Thread Mirko Bonadei via Phabricator via cfe-commits
mbonadei added a comment.

LGTM.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D65462



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D63929: [clang-tidy] - Introduce abseil-prefixed-thread-annotations check.

2019-06-28 Thread Mirko Bonadei via Phabricator via cfe-commits
mbonadei created this revision.
Herald added subscribers: llvm-commits, cfe-commits, xazax.hun, mgorny.
Herald added projects: clang, LLVM.

The new clang-tidy check "abseil-prefixed-thread-annotations" checks for usages 
of deprecated Abseil thread annotation macros and migrates them to the new 
macros that are prefixed with `ABSL_`.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D63929

Files:
  clang-tools-extra/clang-tidy/abseil/AbseilTidyModule.cpp
  clang-tools-extra/clang-tidy/abseil/CMakeLists.txt
  clang-tools-extra/clang-tidy/abseil/PrefixedThreadAnnotationsCheck.cpp
  clang-tools-extra/clang-tidy/abseil/PrefixedThreadAnnotationsCheck.h
  clang-tools-extra/docs/ReleaseNotes.rst
  
clang-tools-extra/docs/clang-tidy/checks/abseil-prefixed-thread-annotations.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  
clang-tools-extra/test/clang-tidy/Inputs/absl/base/internal/thread_annotations.h
  clang-tools-extra/test/clang-tidy/Inputs/absl/base/thread_annotations.h
  clang-tools-extra/test/clang-tidy/abseil-prefixed-thread-annotations.cpp
  llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/abseil/BUILD.gn

Index: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/abseil/BUILD.gn
===
--- llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/abseil/BUILD.gn
+++ llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/abseil/BUILD.gn
@@ -25,6 +25,7 @@
 "FasterStrsplitDelimiterCheck.cpp",
 "NoInternalDependenciesCheck.cpp",
 "NoNamespaceCheck.cpp",
+"PrefixedThreadAnnotationsCheck.cpp",
 "RedundantStrcatCallsCheck.cpp",
 "StrCatAppendCheck.cpp",
 "StringFindStartswithCheck.cpp",
Index: clang-tools-extra/test/clang-tidy/abseil-prefixed-thread-annotations.cpp
===
--- /dev/null
+++ clang-tools-extra/test/clang-tidy/abseil-prefixed-thread-annotations.cpp
@@ -0,0 +1,9 @@
+// RUN: %check_clang_tidy %s abseil-prefixed-thread-annotations %t -- -- -I%S/Inputs
+
+#include "absl/base/thread_annotations.h"
+
+class SCOPED_LOCKABLE X {};
+// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: usage of unprefixed thread annotation [abseil-prefixed-thread-annotations]
+// CHECK-FIXES: class ABSL_SCOPED_LOCKABLE X {};
+
+class ABSL_SCOPED_LOCKABLE Y {};
Index: clang-tools-extra/test/clang-tidy/Inputs/absl/base/thread_annotations.h
===
--- /dev/null
+++ clang-tools-extra/test/clang-tidy/Inputs/absl/base/thread_annotations.h
@@ -0,0 +1,3 @@
+#include "absl/base/internal/thread_annotations.h"
+
+#define ABSL_SCOPED_LOCKABLE
Index: clang-tools-extra/test/clang-tidy/Inputs/absl/base/internal/thread_annotations.h
===
--- /dev/null
+++ clang-tools-extra/test/clang-tidy/Inputs/absl/base/internal/thread_annotations.h
@@ -0,0 +1 @@
+#define SCOPED_LOCKABLE
Index: clang-tools-extra/docs/clang-tidy/checks/list.rst
===
--- clang-tools-extra/docs/clang-tidy/checks/list.rst
+++ clang-tools-extra/docs/clang-tidy/checks/list.rst
@@ -15,6 +15,7 @@
abseil-faster-strsplit-delimiter
abseil-no-internal-dependencies
abseil-no-namespace
+   abseil-prefixed-thread-annotations
abseil-redundant-strcat-calls
abseil-str-cat-append
abseil-string-find-startswith
Index: clang-tools-extra/docs/clang-tidy/checks/abseil-prefixed-thread-annotations.rst
===
--- /dev/null
+++ clang-tools-extra/docs/clang-tidy/checks/abseil-prefixed-thread-annotations.rst
@@ -0,0 +1,28 @@
+.. title:: clang-tidy - abseil-prefixed-thread-annotations
+
+abseil-prefixed-thread-annotations
+==
+
+This check finds usages of deprecated Abseil thread annotation macros and
+migrates them to the new macros that are prefixed with `ABSL_`.
+
+Examples:
+
+.. code-block:: c++
+// Original - Usage of deprecated and unprefixed Abseil thread annotations.
+#include "absl/base/thread_annotations.h"
+
+class X {
+  // ...
+  private:
+absl::Mutex m_;
+int state_ GUARDED_BY(m_);
+};
+
+// Suggestion - Addition of ABSL_ prefix.
+class X {
+  // ...
+  private:
+absl::Mutex m_;
+int state_ ABSL_GUARDED_BY(m_);
+};
Index: clang-tools-extra/docs/ReleaseNotes.rst
===
--- clang-tools-extra/docs/ReleaseNotes.rst
+++ clang-tools-extra/docs/ReleaseNotes.rst
@@ -89,6 +89,12 @@
   Finds and fixes cases where ``absl::Duration`` values are being converted to
   numeric types and back again.
 
+- New :doc:`abseil-prefixed-thread-annotations
+  ` check.
+
+  Checks for usages of deprecated Abseil thread annotation macros and
+  migrates them to the new macros that are prefixed with `ABSL_`.
+
 - New :doc:`abseil-time-comparison
   ` check.
 
Index: clang-tools-