[clang] bfbea45 - Revert "[clang] - Add missing builtin name to AtomicExpr JSON dump"
Douglas Yung via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 24 10:16:27 PDT 2023
Author: Douglas Yung
Date: 2023-08-24T10:11:59-07:00
New Revision: bfbea459af391266cf6a4611f0da4952930d7834
URL: https://github.com/llvm/llvm-project/commit/bfbea459af391266cf6a4611f0da4952930d7834
DIFF: https://github.com/llvm/llvm-project/commit/bfbea459af391266cf6a4611f0da4952930d7834.diff
LOG: Revert "[clang] - Add missing builtin name to AtomicExpr JSON dump"
This reverts commit dbccf3c6f13d2afeecec77136460c5e359164eae.
The test added is failing on many bots including:
- https://lab.llvm.org/buildbot/#/builders/164/builds/42716
- https://lab.llvm.org/buildbot/#/builders/188/builds/34429
- https://lab.llvm.org/buildbot/#/builders/245/builds/13103
- https://lab.llvm.org/buildbot/#/builders/258/builds/6002
- https://lab.llvm.org/buildbot/#/builders/230/builds/17690
- https://lab.llvm.org/buildbot/#/builders/91/builds/17722
- https://lab.llvm.org/buildbot/#/builders/67/builds/12466
- https://lab.llvm.org/buildbot/#/builders/109/builds/72108
- https://lab.llvm.org/buildbot/#/builders/139/builds/48265
- https://lab.llvm.org/buildbot/#/builders/216/builds/26208
- https://lab.llvm.org/buildbot/#/builders/36/builds/36964
- https://lab.llvm.org/buildbot/#/builders/247/builds/8222
Added:
Modified:
clang/include/clang/AST/Expr.h
clang/include/clang/AST/JSONNodeDumper.h
clang/lib/AST/JSONNodeDumper.cpp
Removed:
clang/test/AST/ast-dump-atomic-json.c
################################################################################
diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h
index 8d1235be78a4ad..6737721e1ed1b2 100644
--- a/clang/include/clang/AST/Expr.h
+++ b/clang/include/clang/AST/Expr.h
@@ -6480,15 +6480,6 @@ class AtomicExpr : public Expr {
QualType getValueType() const;
AtomicOp getOp() const { return Op; }
- StringRef getOpAsString() const {
- switch (Op) {
-#define BUILTIN(ID, TYPE, ATTRS)
-#define ATOMIC_BUILTIN(ID, TYPE, ATTRS) \
- case AO##ID: \
- return #ID;
-#include "clang/Basic/Builtins.def"
- }
- }
unsigned getNumSubExprs() const { return NumSubExprs; }
Expr **getSubExprs() { return reinterpret_cast<Expr **>(SubExprs); }
diff --git a/clang/include/clang/AST/JSONNodeDumper.h b/clang/include/clang/AST/JSONNodeDumper.h
index 4def5389137fa4..0ce272df8df65b 100644
--- a/clang/include/clang/AST/JSONNodeDumper.h
+++ b/clang/include/clang/AST/JSONNodeDumper.h
@@ -285,7 +285,6 @@ class JSONNodeDumper
void VisitBinaryOperator(const BinaryOperator *BO);
void VisitCompoundAssignOperator(const CompoundAssignOperator *CAO);
void VisitMemberExpr(const MemberExpr *ME);
- void VisitAtomicExpr(const AtomicExpr *AE);
void VisitCXXNewExpr(const CXXNewExpr *NE);
void VisitCXXDeleteExpr(const CXXDeleteExpr *DE);
void VisitCXXThisExpr(const CXXThisExpr *TE);
diff --git a/clang/lib/AST/JSONNodeDumper.cpp b/clang/lib/AST/JSONNodeDumper.cpp
index e67c2c7e216dce..139dfce41e914c 100644
--- a/clang/lib/AST/JSONNodeDumper.cpp
+++ b/clang/lib/AST/JSONNodeDumper.cpp
@@ -1179,10 +1179,6 @@ void JSONNodeDumper::VisitBlockDecl(const BlockDecl *D) {
attributeOnlyIfTrue("capturesThis", D->capturesCXXThis());
}
-void JSONNodeDumper::VisitAtomicExpr(const AtomicExpr *AE) {
- JOS.attribute("name", AE->getOpAsString());
-}
-
void JSONNodeDumper::VisitObjCEncodeExpr(const ObjCEncodeExpr *OEE) {
JOS.attribute("encodedType", createQualType(OEE->getEncodedType()));
}
diff --git a/clang/test/AST/ast-dump-atomic-json.c b/clang/test/AST/ast-dump-atomic-json.c
deleted file mode 100644
index fd1de94ff94197..00000000000000
--- a/clang/test/AST/ast-dump-atomic-json.c
+++ /dev/null
@@ -1,128 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -ast-dump=json %s | FileCheck %s
-
-int foo(int * ptr) {
- return __atomic_load_n(ptr, __ATOMIC_SEQ_CST);
-}
-
-// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
-// using --filters=AtomicExpr
-
-
-// CHECK-NOT: {{^}}Dumping
-// CHECK: "kind": "AtomicExpr",
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "offset": 132,
-// CHECK-NEXT: "col": 10,
-// CHECK-NEXT: "tokLen": 15
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "offset": 169,
-// CHECK-NEXT: "col": 47,
-// CHECK-NEXT: "tokLen": 1
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "int"
-// CHECK-NEXT: },
-// CHECK-NEXT: "valueCategory": "prvalue",
-// CHECK-NEXT: "name": "__atomic_load_n",
-// CHECK-NEXT: "inner": [
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "ImplicitCastExpr",
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "offset": 148,
-// CHECK-NEXT: "col": 26,
-// CHECK-NEXT: "tokLen": 3
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "offset": 148,
-// CHECK-NEXT: "col": 26,
-// CHECK-NEXT: "tokLen": 3
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "int *"
-// CHECK-NEXT: },
-// CHECK-NEXT: "valueCategory": "prvalue",
-// CHECK-NEXT: "castKind": "LValueToRValue",
-// CHECK-NEXT: "inner": [
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "DeclRefExpr",
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "offset": 148,
-// CHECK-NEXT: "col": 26,
-// CHECK-NEXT: "tokLen": 3
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "offset": 148,
-// CHECK-NEXT: "col": 26,
-// CHECK-NEXT: "tokLen": 3
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "int *"
-// CHECK-NEXT: },
-// CHECK-NEXT: "valueCategory": "lvalue",
-// CHECK-NEXT: "referencedDecl": {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "ParmVarDecl",
-// CHECK-NEXT: "name": "ptr",
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "int *"
-// CHECK-NEXT: }
-// CHECK-NEXT: }
-// CHECK-NEXT: }
-// CHECK-NEXT: ]
-// CHECK-NEXT: },
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "IntegerLiteral",
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "spellingLoc": {
-// CHECK-NEXT: "offset": 417,
-// CHECK-NEXT: "file": "<built-in>",
-// CHECK-NEXT: "line": 13,
-// CHECK-NEXT: "presumedLine": 12,
-// CHECK-NEXT: "col": 26,
-// CHECK-NEXT: "tokLen": 1
-// CHECK-NEXT: },
-// CHECK-NEXT: "expansionLoc": {
-// CHECK-NEXT: "offset": 153,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 4,
-// CHECK-NEXT: "col": 31,
-// CHECK-NEXT: "tokLen": 16
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "spellingLoc": {
-// CHECK-NEXT: "offset": 417,
-// CHECK-NEXT: "file": "<built-in>",
-// CHECK-NEXT: "line": 13,
-// CHECK-NEXT: "presumedLine": 12,
-// CHECK-NEXT: "col": 26,
-// CHECK-NEXT: "tokLen": 1
-// CHECK-NEXT: },
-// CHECK-NEXT: "expansionLoc": {
-// CHECK-NEXT: "offset": 153,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 4,
-// CHECK-NEXT: "col": 31,
-// CHECK-NEXT: "tokLen": 16
-// CHECK-NEXT: }
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "int"
-// CHECK-NEXT: },
-// CHECK-NEXT: "valueCategory": "prvalue",
-// CHECK-NEXT: "value": "5"
-// CHECK-NEXT: }
-// CHECK-NEXT: ]
-// CHECK-NEXT: }
More information about the cfe-commits
mailing list