Skip to content

Commit 59bc3e7

Browse files
committed
Merge commit '00dea7e8c41b672730d6e2c891b6012a83d8842c' into HEAD [#2284]
2 parents 4c445f0 + 00dea7e commit 59bc3e7

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

gcc/rust/lex/rust-lex.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,13 @@ is_non_decimal_int_literal_separator (uint32_t character)
128128
bool
129129
is_identifier_start (uint32_t codepoint)
130130
{
131-
return (check_xid_property (codepoint) & XID_START) || codepoint == '_';
131+
return (cpp_check_xid_property (codepoint) & CPP_XID_START) || codepoint == '_';
132132
}
133133

134134
bool
135135
is_identifier_continue (uint32_t codepoint)
136136
{
137-
return check_xid_property (codepoint) & XID_CONTINUE;
137+
return cpp_check_xid_property (codepoint) & CPP_XID_CONTINUE;
138138
}
139139

140140
Lexer::Lexer (const std::string &input, Linemap *linemap)

libcpp/charset.cc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,16 +1334,16 @@ _cpp_uname2c_uax44_lm2 (const char *name, size_t len, char *canon_name)
13341334

13351335
/* Returns flags representing the XID properties of the given codepoint. */
13361336
unsigned int
1337-
check_xid_property (cppchar_t c)
1337+
cpp_check_xid_property (cppchar_t c)
13381338
{
13391339
// fast path for ASCII
13401340
if (c < 0x80)
1341-
{
1342-
if (('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z'))
1343-
return XID_START | XID_CONTINUE;
1344-
if (('0' <= c && c <= '9') || c == '_')
1345-
return XID_CONTINUE;
1346-
}
1341+
{
1342+
if (('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z'))
1343+
return CPP_XID_START | CPP_XID_CONTINUE;
1344+
if (('0' <= c && c <= '9') || c == '_')
1345+
return CPP_XID_CONTINUE;
1346+
}
13471347

13481348
if (c > UCS_LIMIT)
13491349
return 0;
@@ -1355,17 +1355,17 @@ check_xid_property (cppchar_t c)
13551355
{
13561356
md = (mn + mx) / 2;
13571357
if (c <= ucnranges[md].end)
1358-
mx = md;
1358+
mx = md;
13591359
else
1360-
mn = md + 1;
1360+
mn = md + 1;
13611361
}
13621362

13631363
unsigned short flags = ucnranges[mn].flags;
13641364

13651365
if (flags & CXX23)
1366-
return XID_START | XID_CONTINUE;
1366+
return CPP_XID_START | CPP_XID_CONTINUE;
13671367
if (flags & NXX23)
1368-
return XID_CONTINUE;
1368+
return CPP_XID_CONTINUE;
13691369
return 0;
13701370
}
13711371

libcpp/include/cpplib.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,11 +1631,11 @@ bool cpp_valid_utf8_p (const char *data, size_t num_bytes);
16311631
bool cpp_is_combining_char (cppchar_t c);
16321632
bool cpp_is_printable_char (cppchar_t c);
16331633

1634-
enum {
1635-
XID_START = 1,
1636-
XID_CONTINUE = 2
1634+
enum cpp_xid_property {
1635+
CPP_XID_START = 1,
1636+
CPP_XID_CONTINUE = 2
16371637
};
16381638

1639-
unsigned int check_xid_property (cppchar_t c);
1639+
unsigned int cpp_check_xid_property (cppchar_t c);
16401640

16411641
#endif /* ! LIBCPP_CPPLIB_H */

0 commit comments

Comments
 (0)