Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
3ef7e85d
Kaydet (Commit)
3ef7e85d
authored
Tem 14, 2017
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove some dead code from unusedfields plugin
Change-Id: I268b32270a17c0c3fcf8236c3e0eebac9a57cb5d
üst
6feb40b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
9 deletions
+0
-9
unusedfields.cxx
compilerplugins/clang/unusedfields.cxx
+0
-6
unusedfields.py
compilerplugins/clang/unusedfields.py
+0
-3
No files found.
compilerplugins/clang/unusedfields.cxx
Dosyayı görüntüle @
3ef7e85d
...
...
@@ -60,7 +60,6 @@ bool operator < (const MyFieldInfo &lhs, const MyFieldInfo &rhs)
// try to limit the voluminous output a little
static
std
::
set
<
MyFieldInfo
>
touchedFromInsideSet
;
static
std
::
set
<
MyFieldInfo
>
touchedFromConstructorSet
;
static
std
::
set
<
MyFieldInfo
>
touchedFromOutsideSet
;
static
std
::
set
<
MyFieldInfo
>
readFromSet
;
static
std
::
set
<
MyFieldInfo
>
definitionSet
;
...
...
@@ -102,8 +101,6 @@ void UnusedFields::run()
std
::
string
output
;
for
(
const
MyFieldInfo
&
s
:
touchedFromInsideSet
)
output
+=
"inside:
\t
"
+
s
.
parentClass
+
"
\t
"
+
s
.
fieldName
+
"
\n
"
;
for
(
const
MyFieldInfo
&
s
:
touchedFromConstructorSet
)
output
+=
"constructor:
\t
"
+
s
.
parentClass
+
"
\t
"
+
s
.
fieldName
+
"
\n
"
;
for
(
const
MyFieldInfo
&
s
:
touchedFromOutsideSet
)
output
+=
"outside:
\t
"
+
s
.
parentClass
+
"
\t
"
+
s
.
fieldName
+
"
\n
"
;
for
(
const
MyFieldInfo
&
s
:
readFromSet
)
...
...
@@ -489,9 +486,6 @@ void UnusedFields::checkTouchedFromOutside(const FieldDecl* fieldDecl, const Exp
// ignore move/copy operator, it's self->self
}
else
if
(
constructorDecl
&&
(
constructorDecl
->
isCopyConstructor
()
||
constructorDecl
->
isMoveConstructor
()))
{
// ignore move/copy constructor, it's self->self
}
else
if
(
constructorDecl
&&
memberExprParentFunction
->
getParent
()
==
fieldDecl
->
getParent
())
{
// if the field is touched from inside it's parent class constructor
touchedFromConstructorSet
.
insert
(
fieldInfo
);
}
else
{
if
(
memberExprParentFunction
->
getParent
()
==
fieldDecl
->
getParent
())
{
touchedFromInsideSet
.
insert
(
fieldInfo
);
...
...
compilerplugins/clang/unusedfields.py
Dosyayı görüntüle @
3ef7e85d
...
...
@@ -9,7 +9,6 @@ protectedAndPublicDefinitionSet = set() # set of tuple(type, name)
definitionToSourceLocationMap
=
dict
()
definitionToTypeMap
=
dict
()
touchedFromInsideSet
=
set
()
touchedFromConstructorSet
=
set
()
readFromSet
=
set
()
sourceLocationSet
=
set
()
touchedFromOutsideSet
=
set
()
...
...
@@ -48,8 +47,6 @@ with io.open("loplugin.unusedfields.log", "rb", buffering=1024*1024) as txt:
definitionToSourceLocationMap
[
fieldInfo
]
=
tokens
[
5
]
elif
tokens
[
0
]
==
"inside:"
:
touchedFromInsideSet
.
add
(
parseFieldInfo
(
tokens
))
elif
tokens
[
0
]
==
"constructor:"
:
touchedFromConstructorSet
.
add
(
parseFieldInfo
(
tokens
))
elif
tokens
[
0
]
==
"outside:"
:
touchedFromOutsideSet
.
add
(
parseFieldInfo
(
tokens
))
elif
tokens
[
0
]
==
"read:"
:
...
...
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