[PATCH] D46905: [Attr] Don't print fake MSInheritance argument
This revision was automatically updated to reflect the committed changes. Closed by commit rL332481: [Attr] Dont 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=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 : Argument; // A bool argument with a default value -class DefaultBoolArgument : BoolArgument { +class DefaultBoolArgument +: BoolArgument { 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; 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 : Argument ; // A bool argument with a default value -class DefaultBoolArgument : BoolArgument { +class DefaultBoolArgument +: BoolArgument { 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; ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D46905: [Attr] Don't print fake MSInheritance argument
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D46905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D46905: [Attr] Don't print fake MSInheritance argument
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 : Argument; // A bool argument with a default value -class DefaultBoolArgument : BoolArgument { +class DefaultBoolArgument +: BoolArgument { 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">, 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 : Argument ; // A bool argument with a default value -class DefaultBoolArgument : BoolArgument { +class DefaultBoolArgument +: BoolArgument { 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">, ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits