diff --git a/libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp b/libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp --- a/libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp +++ b/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; }