Author: Douglas Yung
Date: 2023-08-14T16:15:30-07:00
New Revision: b7e1d26f841c7ef3db46d30239c179a1e1b4d156

URL: 
https://github.com/llvm/llvm-project/commit/b7e1d26f841c7ef3db46d30239c179a1e1b4d156
DIFF: 
https://github.com/llvm/llvm-project/commit/b7e1d26f841c7ef3db46d30239c179a1e1b4d156.diff

LOG: Revert "[clang] Add missing field to VisibilityAttr json AST dump"

This reverts commit 2107d87c5a9103ffc4c0f76fc00ab203603f9df1.

Change is causing test failures on many bots:
- https://lab.llvm.org/buildbot/#/builders/164/builds/42180
- https://lab.llvm.org/buildbot/#/builders/188/builds/33880
- https://lab.llvm.org/buildbot/#/builders/245/builds/12558
- https://lab.llvm.org/buildbot/#/builders/258/builds/5404
- https://lab.llvm.org/buildbot/#/builders/249/builds/8049
- https://lab.llvm.org/buildbot/#/builders/230/builds/17170
- https://lab.llvm.org/buildbot/#/builders/91/builds/17108
- https://lab.llvm.org/buildbot/#/builders/109/builds/71264
- https://lab.llvm.org/buildbot/#/builders/139/builds/47461
- https://lab.llvm.org/buildbot/#/builders/216/builds/25598
- https://lab.llvm.org/buildbot/#/builders/36/builds/36549
- https://lab.llvm.org/buildbot/#/builders/247/builds/7747

Added: 
    

Modified: 
    clang/include/clang/AST/JSONNodeDumper.h
    clang/lib/AST/JSONNodeDumper.cpp
    clang/test/AST/ast-dump-attr-json.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/AST/JSONNodeDumper.h 
b/clang/include/clang/AST/JSONNodeDumper.h
index 03c903069ad877..089c0e97a90472 100644
--- a/clang/include/clang/AST/JSONNodeDumper.h
+++ b/clang/include/clang/AST/JSONNodeDumper.h
@@ -213,7 +213,6 @@ class JSONNodeDumper
   void VisitDeprecatedAttr(const DeprecatedAttr *DA);
   void VisitUnavailableAttr(const UnavailableAttr *UA);
   void VisitSectionAttr(const SectionAttr *SA);
-  void VisitVisibilityAttr(const VisibilityAttr *VA);
 
   void VisitTypedefType(const TypedefType *TT);
   void VisitUsingType(const UsingType *TT);

diff  --git a/clang/lib/AST/JSONNodeDumper.cpp 
b/clang/lib/AST/JSONNodeDumper.cpp
index 134938a1ef19a0..ec5661d1d6944d 100644
--- a/clang/lib/AST/JSONNodeDumper.cpp
+++ b/clang/lib/AST/JSONNodeDumper.cpp
@@ -554,11 +554,6 @@ void JSONNodeDumper::VisitSectionAttr(const SectionAttr 
*SA) {
   JOS.attribute("section_name", SA->getName());
 }
 
-void JSONNodeDumper::VisitVisibilityAttr(const VisibilityAttr *VA) {
-  JOS.attribute("visibility", VisibilityAttr::ConvertVisibilityTypeToStr(
-                                  VA->getVisibility()));
-}
-
 void JSONNodeDumper::VisitTypedefType(const TypedefType *TT) {
   JOS.attribute("decl", createBareDeclRef(TT->getDecl()));
   if (!TT->typeMatchesDecl())

diff  --git a/clang/test/AST/ast-dump-attr-json.cpp 
b/clang/test/AST/ast-dump-attr-json.cpp
index 0eb930b851a15e..a9679695e954f1 100644
--- a/clang/test/AST/ast-dump-attr-json.cpp
+++ b/clang/test/AST/ast-dump-attr-json.cpp
@@ -17,9 +17,6 @@ __attribute__((unavailable("reason"))) int unavailable_var1;
 
 __attribute__ ((section ("SECTION_NAME"))) int section_var;
 
-__attribute__ ((visibility ("hidden"))) int visibility_var;
-
-
 // NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
 // using --filters=VarDecl
 
@@ -432,50 +429,3 @@ __attribute__ ((visibility ("hidden"))) int visibility_var;
 // CHECK-NEXT:   }
 // CHECK-NEXT:  ]
 // CHECK-NEXT: }
-
-
-// CHECK-NOT: {{^}}Dumping
-// CHECK:  "kind": "VarDecl",
-// CHECK-NEXT:  "loc": {
-// CHECK-NEXT:   "offset": 651,
-// CHECK-NEXT:   "line": 20,
-// CHECK-NEXT:   "col": 45,
-// CHECK-NEXT:   "tokLen": 14
-// CHECK-NEXT:  },
-// CHECK-NEXT:  "range": {
-// CHECK-NEXT:   "begin": {
-// CHECK-NEXT:    "offset": 607,
-// CHECK-NEXT:    "col": 1,
-// CHECK-NEXT:    "tokLen": 13
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "end": {
-// CHECK-NEXT:    "offset": 651,
-// CHECK-NEXT:    "col": 45,
-// CHECK-NEXT:    "tokLen": 14
-// CHECK-NEXT:   }
-// CHECK-NEXT:  },
-// CHECK-NEXT:  "name": "visibility_var",
-// CHECK-NEXT:  "mangledName": "visibility_var",
-// CHECK-NEXT:  "type": {
-// CHECK-NEXT:   "qualType": "int"
-// CHECK-NEXT:  },
-// CHECK-NEXT:  "inner": [
-// CHECK-NEXT:   {
-// CHECK-NEXT:    "id": "0x{{.*}}",
-// CHECK-NEXT:    "kind": "VisibilityAttr",
-// CHECK-NEXT:    "range": {
-// CHECK-NEXT:     "begin": {
-// CHECK-NEXT:      "offset": 623,
-// CHECK-NEXT:      "col": 17,
-// CHECK-NEXT:      "tokLen": 10
-// CHECK-NEXT:     },
-// CHECK-NEXT:     "end": {
-// CHECK-NEXT:      "offset": 643,
-// CHECK-NEXT:      "col": 37,
-// CHECK-NEXT:      "tokLen": 1
-// CHECK-NEXT:     }
-// CHECK-NEXT:    },
-// CHECK-NEXT:    "visibility": "hidden"
-// CHECK-NEXT:   }
-// CHECK-NEXT:  ]
-// CHECK-NEXT: }


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

Reply via email to