[PATCH] D135931: [Attributes] Improve writing `ExprArgument` value.
Volodymyr Sapsai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 14 11:21:30 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1783253c41f1: [Attributes] Improve writing `ExprArgument` value. (authored by vsapsai).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135931/new/
https://reviews.llvm.org/D135931
Files:
clang/test/SemaCXX/attr-print.cpp
clang/utils/TableGen/ClangAttrEmitter.cpp
Index: clang/utils/TableGen/ClangAttrEmitter.cpp
===================================================================
--- clang/utils/TableGen/ClangAttrEmitter.cpp
+++ clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -1216,6 +1216,13 @@
OS << " }\n";
}
+ void writeValue(raw_ostream &OS) const override {
+ OS << "\";\n";
+ OS << " get" << getUpperName()
+ << "()->printPretty(OS, nullptr, Policy);\n";
+ OS << " OS << \"";
+ }
+
void writeDump(raw_ostream &OS) const override {}
void writeDumpChildren(raw_ostream &OS) const override {
Index: clang/test/SemaCXX/attr-print.cpp
===================================================================
--- clang/test/SemaCXX/attr-print.cpp
+++ clang/test/SemaCXX/attr-print.cpp
@@ -43,3 +43,6 @@
// CHECK: class __virtual_inheritance VirtualInheritance;
class __virtual_inheritance VirtualInheritance;
+
+// CHECK: typedef double *aligned_double __attribute__((align_value(64)));
+typedef double * __attribute__((align_value(64))) aligned_double;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135931.467854.patch
Type: text/x-patch
Size: 1056 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221014/618664dd/attachment.bin>
More information about the cfe-commits
mailing list