aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/JSONNodeDumper.cpp
diff options
context:
space:
mode:
authorserge-sans-paille <sguelton@mozilla.com>2023-08-22 23:33:33 +0200
committerserge-sans-paille <sguelton@mozilla.com>2023-08-28 06:34:57 +0200
commit4198576157bfd0d08c08b784220d6132b709ae2c (patch)
tree640de99143cdb9130d6803b83f609c0cda26124e /clang/lib/AST/JSONNodeDumper.cpp
parent8514d207ba914ed0ba48ae386cb2652f258700df (diff)
downloadllvm-4198576157bfd0d08c08b784220d6132b709ae2c.zip
llvm-4198576157bfd0d08c08b784220d6132b709ae2c.tar.gz
llvm-4198576157bfd0d08c08b784220d6132b709ae2c.tar.bz2
[clang] - Add missing builtin name to AtomicExpr JSON dump
As a side effect, introduce AtomicExpr::getOpAsString() to dump the AtomicOp string representation. This is a recommit with the ranges unchecked to cope with platform-specific values. Differential Revision: https://reviews.llvm.org/D158558
Diffstat (limited to 'clang/lib/AST/JSONNodeDumper.cpp')
-rw-r--r--clang/lib/AST/JSONNodeDumper.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/JSONNodeDumper.cpp b/clang/lib/AST/JSONNodeDumper.cpp
index 139dfce..e67c2c7 100644
--- a/clang/lib/AST/JSONNodeDumper.cpp
+++ b/clang/lib/AST/JSONNodeDumper.cpp
@@ -1179,6 +1179,10 @@ 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()));
}