Skip to content

Commit ed4feed

Browse files
committed
[Attributes] Improve writing ExprArgument value.
Instead of dumping `Expr*` memory address, output `Expr` representation. Differential Revision: https://reviews.llvm.org/D135931 (cherry picked from commit 1783253)
1 parent 4ff41d0 commit ed4feed

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

clang/test/SemaCXX/attr-print.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@ class __multiple_inheritance MultipleInheritance;
4343

4444
// CHECK: class __virtual_inheritance VirtualInheritance;
4545
class __virtual_inheritance VirtualInheritance;
46+
47+
// CHECK: typedef double *aligned_double __attribute__((align_value(64)));
48+
typedef double * __attribute__((align_value(64))) aligned_double;

clang/utils/TableGen/ClangAttrEmitter.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,13 @@ namespace {
11731173
OS << " }\n";
11741174
}
11751175

1176+
void writeValue(raw_ostream &OS) const override {
1177+
OS << "\";\n";
1178+
OS << " get" << getUpperName()
1179+
<< "()->printPretty(OS, nullptr, Policy);\n";
1180+
OS << " OS << \"";
1181+
}
1182+
11761183
void writeDump(raw_ostream &OS) const override {}
11771184

11781185
void writeDumpChildren(raw_ostream &OS) const override {

0 commit comments

Comments
 (0)