Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abseil-cpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
abseil-cpp
Commits
33582861
Commit
33582861
authored
Jul 22, 2024
by
Derek Mauro
Committed by
Copybara-Service
Jul 22, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix LINT.IfChange syntax
PiperOrigin-RevId: 654745969 Change-Id: I96b9797c0fb91cf22e5a50ef97223216683d4ec7
parent
3cb49889
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
absl/strings/internal/cord_internal.h
+2
-2
absl/strings/internal/cord_rep_btree.h
+2
-2
No files found.
absl/strings/internal/cord_internal.h
View file @
33582861
...
@@ -259,7 +259,7 @@ struct CordRep {
...
@@ -259,7 +259,7 @@ struct CordRep {
// on the specific layout of these fields. Notably: the non-trivial field
// on the specific layout of these fields. Notably: the non-trivial field
// `refcount` being preceded by `length`, and being tailed by POD data
// `refcount` being preceded by `length`, and being tailed by POD data
// members only.
// members only.
//
#
LINT.IfChange
// LINT.IfChange
size_t
length
;
size_t
length
;
RefcountAndFlags
refcount
;
RefcountAndFlags
refcount
;
// If tag < FLAT, it represents CordRepKind and indicates the type of node.
// If tag < FLAT, it represents CordRepKind and indicates the type of node.
...
@@ -275,7 +275,7 @@ struct CordRep {
...
@@ -275,7 +275,7 @@ struct CordRep {
// allocate room for these in the derived class, as not all compilers reuse
// allocate room for these in the derived class, as not all compilers reuse
// padding space from the base class (clang and gcc do, MSVC does not, etc)
// padding space from the base class (clang and gcc do, MSVC does not, etc)
uint8_t
storage
[
3
];
uint8_t
storage
[
3
];
//
#
LINT.ThenChange(cord_rep_btree.h:copy_raw)
// LINT.ThenChange(cord_rep_btree.h:copy_raw)
// Returns true if this instance's tag matches the requested type.
// Returns true if this instance's tag matches the requested type.
constexpr
bool
IsSubstring
()
const
{
return
tag
==
SUBSTRING
;
}
constexpr
bool
IsSubstring
()
const
{
return
tag
==
SUBSTRING
;
}
...
...
absl/strings/internal/cord_rep_btree.h
View file @
33582861
...
@@ -684,14 +684,14 @@ inline CordRepBtree* CordRepBtree::CopyRaw(size_t new_length) const {
...
@@ -684,14 +684,14 @@ inline CordRepBtree* CordRepBtree::CopyRaw(size_t new_length) const {
// except `refcount` is trivially copyable, and the compiler does not
// except `refcount` is trivially copyable, and the compiler does not
// efficiently coalesce member-wise copy of these members.
// efficiently coalesce member-wise copy of these members.
// See https://gcc.godbolt.org/z/qY8zsca6z
// See https://gcc.godbolt.org/z/qY8zsca6z
//
#
LINT.IfChange(copy_raw)
// LINT.IfChange(copy_raw)
tree
->
length
=
new_length
;
tree
->
length
=
new_length
;
uint8_t
*
dst
=
&
tree
->
tag
;
uint8_t
*
dst
=
&
tree
->
tag
;
const
uint8_t
*
src
=
&
tag
;
const
uint8_t
*
src
=
&
tag
;
const
ptrdiff_t
offset
=
src
-
reinterpret_cast
<
const
uint8_t
*>
(
this
);
const
ptrdiff_t
offset
=
src
-
reinterpret_cast
<
const
uint8_t
*>
(
this
);
memcpy
(
dst
,
src
,
sizeof
(
CordRepBtree
)
-
static_cast
<
size_t
>
(
offset
));
memcpy
(
dst
,
src
,
sizeof
(
CordRepBtree
)
-
static_cast
<
size_t
>
(
offset
));
return
tree
;
return
tree
;
//
#
LINT.ThenChange()
// LINT.ThenChange()
}
}
inline
CordRepBtree
*
CordRepBtree
::
Copy
()
const
{
inline
CordRepBtree
*
CordRepBtree
::
Copy
()
const
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment