Revert "[clang] - Add missing builtin name to AtomicExpr JSON dump"

There seems to be something target-specific in the test, but I cannot
get why, revering.
s
Failing buildbot: https://lab.llvm.org/buildbot/#/builders/216/builds/26256

This reverts commit 01b2554ff4.
This commit is contained in:
serge-sans-paille 2023-08-25 09:50:49 +02:00
parent 1b12427c01
commit 8760ff163c
No known key found for this signature in database
GPG Key ID: 7B24DA8C9551659F
4 changed files with 0 additions and 142 deletions

View File

@ -6480,15 +6480,6 @@ public:
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); }

View File

@ -285,7 +285,6 @@ public:
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);

View File

@ -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()));
}

View File

@ -1,128 +0,0 @@
// RUN: %clang_cc1 -triple x86_64-pc-linux -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": 125,
// CHECK-NEXT: "col": 10,
// CHECK-NEXT: "tokLen": 15
// CHECK-NEXT: },
// CHECK-NEXT: "end": {
// CHECK-NEXT: "offset": 162,
// 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": 141,
// CHECK-NEXT: "col": 26,
// CHECK-NEXT: "tokLen": 3
// CHECK-NEXT: },
// CHECK-NEXT: "end": {
// CHECK-NEXT: "offset": 141,
// 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": 141,
// CHECK-NEXT: "col": 26,
// CHECK-NEXT: "tokLen": 3
// CHECK-NEXT: },
// CHECK-NEXT: "end": {
// CHECK-NEXT: "offset": 141,
// 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": 146,
// 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": 146,
// 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: }