Title: [220010] trunk/Tools
- Revision
- 220010
- Author
- [email protected]
- Date
- 2017-07-28 11:54:33 -0700 (Fri, 28 Jul 2017)
Log Message
Using "auto <function()> -> returnType" breaks prepare-ChangeLog
https://bugs.webkit.org/show_bug.cgi?id=174930
Reviewed by Daniel Bates.
Teach prepare-ChangeLog about C++ auto arrow return, and while I'm
here also teach it about const and volatile overloads. I didn't do
reference and rvalue reference overloads because we don't really
use them, and the current parser throws away those characters and
it doesn't seem worth making it more complex.
* Scripts/prepare-ChangeLog:
(get_function_line_ranges_for_cpp):
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt:
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests.cpp:
(Foo::Arrow::arrow):
(Foo::Arrow::otherArrow):
(Foo::Arrow::otherArrow const):
(Foo::Arrow::otherArrow volatile):
(Foo::Arrow::otherArrow const volatile):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (220009 => 220010)
--- trunk/Tools/ChangeLog 2017-07-28 18:36:37 UTC (rev 220009)
+++ trunk/Tools/ChangeLog 2017-07-28 18:54:33 UTC (rev 220010)
@@ -1,3 +1,26 @@
+2017-07-28 JF Bastien <[email protected]>
+
+ Using "auto <function()> -> returnType" breaks prepare-ChangeLog
+ https://bugs.webkit.org/show_bug.cgi?id=174930
+
+ Reviewed by Daniel Bates.
+
+ Teach prepare-ChangeLog about C++ auto arrow return, and while I'm
+ here also teach it about const and volatile overloads. I didn't do
+ reference and rvalue reference overloads because we don't really
+ use them, and the current parser throws away those characters and
+ it doesn't seem worth making it more complex.
+
+ * Scripts/prepare-ChangeLog:
+ (get_function_line_ranges_for_cpp):
+ * Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt:
+ * Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests.cpp:
+ (Foo::Arrow::arrow):
+ (Foo::Arrow::otherArrow):
+ (Foo::Arrow::otherArrow const):
+ (Foo::Arrow::otherArrow volatile):
+ (Foo::Arrow::otherArrow const volatile):
+
2017-07-28 Adrian Perez de Castro <[email protected]>
[GTK] Building with ENABLE_VIDEO=OFF fails
Modified: trunk/Tools/Scripts/prepare-ChangeLog (220009 => 220010)
--- trunk/Tools/Scripts/prepare-ChangeLog 2017-07-28 18:36:37 UTC (rev 220009)
+++ trunk/Tools/Scripts/prepare-ChangeLog 2017-07-28 18:54:33 UTC (rev 220010)
@@ -1007,9 +1007,25 @@
next;
}
+ if ($1 eq "const") {
+ $potential_name .= " const";
+ next;
+ }
+
+ if ($1 eq "volatile") {
+ $potential_name .= " volatile";
+ next;
+ }
+
+ # C++ auto function() -> type
+ if ($1 eq ">") {
+ $skip_til_brace_or_semicolon = 1 unless ($in_parentheses || $in_braces);
+ next;
+ }
+
# C++ constructor initializers
if ($1 eq ":") {
- $skip_til_brace_or_semicolon = 1 unless ($in_parentheses || $in_braces);
+ $skip_til_brace_or_semicolon = 1 unless ($in_parentheses || $in_braces);
}
# Open brace.
Modified: trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt (220009 => 220010)
--- trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt 2017-07-28 18:36:37 UTC (rev 220009)
+++ trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt 2017-07-28 18:54:33 UTC (rev 220010)
@@ -221,6 +221,31 @@
'391',
'393',
'Class110<TemplateClass>::func36'
+ ],
+ [
+ '399',
+ '402',
+ 'Foo::Arrow::arrow'
+ ],
+ [
+ '409',
+ '412',
+ 'Foo::Arrow::otherArrow'
+ ],
+ [
+ '414',
+ '417',
+ 'Foo::Arrow::otherArrow const'
+ ],
+ [
+ '419',
+ '422',
+ 'Foo::Arrow::otherArrow volatile'
+ ],
+ [
+ '424',
+ '427',
+ 'Foo::Arrow::otherArrow const volatile'
]
]
}
Modified: trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests.cpp (220009 => 220010)
--- trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests.cpp 2017-07-28 18:36:37 UTC (rev 220009)
+++ trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests.cpp 2017-07-28 18:54:33 UTC (rev 220010)
@@ -391,3 +391,38 @@
void Class110<TemplateClass>::func36()
{
}
+
+namespace Foo {
+ class Arrow {
+ public:
+ typedef int MyType;
+ auto arrow(MyType a, MyType b) -> MyType
+ {
+ return 42;
+ }
+ MyType otherArrow(MyType a);
+ MyType otherArrow(MyType a) const;
+ MyType otherArrow(MyType a) volatile;
+ MyType otherArrow(MyType a) const volatile;
+ };
+
+ auto Arrow::otherArrow(MyType a) -> MyType
+ {
+ return 0xc0defefe;
+ }
+
+ auto Arrow::otherArrow(MyType a) const -> MyType
+ {
+ return 0xc0defefe;
+ }
+
+ auto Arrow::otherArrow(MyType a) volatile -> MyType
+ {
+ return 0xc0defefe;
+ }
+
+ auto Arrow::otherArrow(MyType a) const volatile -> MyType
+ {
+ return 0xc0defefe;
+ }
+}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes