r332481 - [Attr] Don't print fake MSInheritance argument
Joel E. Denny via cfe-commits
cfe-commits at lists.llvm.org
Wed May 16 08:18:30 PDT 2018
Author: jdenny
Date: Wed May 16 08:18:30 2018
New Revision: 332481
URL: http://llvm.org/viewvc/llvm-project?rev=332481&view=rev
Log:
[Attr] Don't print fake MSInheritance argument
This was discovered at:
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20180514/228390.html
Reviewed by: aaron.ballman
Differential Revision: https://reviews.llvm.org/D46905
Modified:
cfe/trunk/include/clang/Basic/Attr.td
cfe/trunk/test/SemaCXX/attr-print.cpp
Modified: cfe/trunk/include/clang/Basic/Attr.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=332481&r1=332480&r2=332481&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Attr.td (original)
+++ cfe/trunk/include/clang/Basic/Attr.td Wed May 16 08:18:30 2018
@@ -184,7 +184,8 @@ class VersionArgument<string name, bit o
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 UPtr : TypeAttr {
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">,
Modified: cfe/trunk/test/SemaCXX/attr-print.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/attr-print.cpp?rev=332481&r1=332480&r2=332481&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/attr-print.cpp (original)
+++ cfe/trunk/test/SemaCXX/attr-print.cpp Wed May 16 08:18:30 2018
@@ -34,3 +34,12 @@ class __attribute__((consumable(unknown)
// 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;
More information about the cfe-commits
mailing list