[PATCH] D46905: [Attr] Don't print fake MSInheritance argument
Joel E. Denny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 15 14:52:50 PDT 2018
jdenny created this revision.
jdenny added reviewers: aaron.ballman, rsmith, hfinkel.
This was discovered at:
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20180514/228390.html
https://reviews.llvm.org/D46905
Files:
include/clang/Basic/Attr.td
test/SemaCXX/attr-print.cpp
Index: test/SemaCXX/attr-print.cpp
===================================================================
--- test/SemaCXX/attr-print.cpp
+++ test/SemaCXX/attr-print.cpp
@@ -34,3 +34,12 @@
// CHECK: void callableWhen() __attribute__((callable_when("unconsumed", "consumed")));
void callableWhen() __attribute__((callable_when("unconsumed", "consumed")));
};
+
+// CHECK: class __single_inheritance SingleInheritance;
+class __single_inheritance SingleInheritance;
+
+// CHECK: class __multiple_inheritance MultipleInheritance;
+class __multiple_inheritance MultipleInheritance;
+
+// CHECK: class __virtual_inheritance VirtualInheritance;
+class __virtual_inheritance VirtualInheritance;
Index: include/clang/Basic/Attr.td
===================================================================
--- include/clang/Basic/Attr.td
+++ include/clang/Basic/Attr.td
@@ -184,7 +184,8 @@
class AlignedArgument<string name, bit opt = 0> : Argument<name, opt>;
// A bool argument with a default value
-class DefaultBoolArgument<string name, bit default> : BoolArgument<name, 1> {
+class DefaultBoolArgument<string name, bit default, bit fake = 0>
+ : BoolArgument<name, 1, fake> {
bit Default = default;
}
@@ -2617,7 +2618,7 @@
def MSInheritance : InheritableAttr {
let LangOpts = [MicrosoftExt];
- let Args = [DefaultBoolArgument<"BestCase", 1>];
+ let Args = [DefaultBoolArgument<"BestCase", /*default*/1, /*fake*/1>];
let Spellings = [Keyword<"__single_inheritance">,
Keyword<"__multiple_inheritance">,
Keyword<"__virtual_inheritance">,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46905.146923.patch
Type: text/x-patch
Size: 1594 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180515/162dd13f/attachment-0001.bin>
More information about the cfe-commits
mailing list