[libcxx-commits] [PATCH] D151224: [libc++] Fixes clang-tidy plugin for clang-tidy 17.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 24 09:07:26 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG81fb5a0e1cf8: [libc++] Fixes clang-tidy plugin for clang-tidy 17. (authored by Mordante).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151224

Files:
  libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp


Index: libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp
===================================================================
--- libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp
+++ libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp
@@ -69,7 +69,7 @@
 }
 
 AST_MATCHER(clang::Attr, isPretty) {
-  if (Node.isKeywordAttribute())
+  if (Node.isKeywordAttribute() || !Node.getAttrName())
     return false;
   if (Node.isCXX11Attribute() && !Node.hasScope()) {
     if (isUgly(Node.getAttrName()->getName()))
@@ -80,8 +80,7 @@
   if (Node.hasScope())
     if (!isUgly(Node.getScopeName()->getName()))
       return true;
-  if (Node.getAttrName())
-    return !isUgly(Node.getAttrName()->getName());
+  return !isUgly(Node.getAttrName()->getName());
 
   return false;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151224.525207.patch
Type: text/x-patch
Size: 793 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230524/140cbe72/attachment.bin>


More information about the libcxx-commits mailing list