File tree Expand file tree Collapse file tree 4 files changed +51
-0
lines changed
Expand file tree Collapse file tree 4 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -5762,6 +5762,7 @@ cin_is_cpp_namespace(char_u *s)
57625762{
57635763 char_u * p ;
57645764 int has_name = FALSE;
5765+ int has_name_start = FALSE;
57655766
57665767 s = cin_skipcomment (s );
57675768 if (STRNCMP (s , "namespace" , 9 ) == 0 && (s [9 ] == NUL || !vim_iswordc (s [9 ])))
@@ -5780,10 +5781,18 @@ cin_is_cpp_namespace(char_u *s)
57805781 }
57815782 else if (vim_iswordc (* p ))
57825783 {
5784+ has_name_start = TRUE;
57835785 if (has_name )
57845786 return FALSE; /* word character after skipping past name */
57855787 ++ p ;
57865788 }
5789+ else if (p [0 ] == ':' && p [1 ] == ':' && vim_iswordc (p [2 ]))
5790+ {
5791+ if (!has_name_start || has_name )
5792+ return FALSE;
5793+ /* C++ 17 nested namespace */
5794+ p += 3 ;
5795+ }
57875796 else
57885797 {
57895798 return FALSE;
Original file line number Diff line number Diff line change @@ -1932,6 +1932,26 @@ namespace test
19321932{
19331933 111111111111111111;
19341934}
1935+ namespace test::cpp17
1936+ {
1937+ 111111111111111111;
1938+ }
1939+ namespace ::incorrectcpp17
1940+ {
1941+ 111111111111111111;
1942+ }
1943+ namespace test::incorrectcpp17::
1944+ {
1945+ 111111111111111111;
1946+ }
1947+ namespace test:incorrectcpp17
1948+ {
1949+ 111111111111111111;
1950+ }
1951+ namespace test:::incorrectcpp17
1952+ {
1953+ 111111111111111111;
1954+ }
19351955namespace{
19361956 111111111111111111;
19371957}
Original file line number Diff line number Diff line change @@ -1730,6 +1730,26 @@ namespace test
17301730{
17311731111111111111111111;
17321732}
1733+ namespace test::cpp17
1734+ {
1735+ 111111111111111111;
1736+ }
1737+ namespace ::incorrectcpp17
1738+ {
1739+ 111111111111111111;
1740+ }
1741+ namespace test::incorrectcpp17::
1742+ {
1743+ 111111111111111111;
1744+ }
1745+ namespace test:incorrectcpp17
1746+ {
1747+ 111111111111111111;
1748+ }
1749+ namespace test:::incorrectcpp17
1750+ {
1751+ 111111111111111111;
1752+ }
17331753namespace{
17341754111111111111111111;
17351755}
Original file line number Diff line number Diff line change @@ -764,6 +764,8 @@ static char *(features[]) =
764764
765765static int included_patches [] =
766766{ /* Add new patch number below this line */
767+ /**/
768+ 92 ,
767769/**/
768770 91 ,
769771/**/
You can’t perform that action at this time.
0 commit comments