[PATCH] D46905: [Attr] Don't print fake MSInheritance argument

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 16 08:22:26 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL332481: [Attr] Don't print fake MSInheritance argument (authored by jdenny, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D46905?vs=146923&id=147096#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D46905

Files:
  cfe/trunk/include/clang/Basic/Attr.td
  cfe/trunk/test/SemaCXX/attr-print.cpp


Index: cfe/trunk/include/clang/Basic/Attr.td
===================================================================
--- cfe/trunk/include/clang/Basic/Attr.td
+++ cfe/trunk/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;
 }
 
@@ -2624,7 +2625,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">,
Index: cfe/trunk/test/SemaCXX/attr-print.cpp
===================================================================
--- cfe/trunk/test/SemaCXX/attr-print.cpp
+++ cfe/trunk/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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46905.147096.patch
Type: text/x-patch
Size: 1654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180516/d6d2f240/attachment.bin>


More information about the llvm-commits mailing list