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
cbb7b10b
Kaydet (Commit)
cbb7b10b
authored
Kas 04, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
-Werror=unused-function
Change-Id: I33790862cfe40693921d07182ccf4645c3ef28a3
üst
bb3e1962
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
37 deletions
+0
-37
unnecessaryvirtual.cxx
compilerplugins/clang/unnecessaryvirtual.cxx
+0
-37
No files found.
compilerplugins/clang/unnecessaryvirtual.cxx
Dosyayı görüntüle @
cbb7b10b
...
...
@@ -76,7 +76,6 @@ public:
bool
VisitCXXMethodDecl
(
const
CXXMethodDecl
*
decl
);
private
:
std
::
string
fullyQualifiedName
(
const
FunctionDecl
*
functionDecl
);
std
::
string
toString
(
SourceLocation
loc
);
};
...
...
@@ -97,42 +96,6 @@ std::string niceName(const CXXMethodDecl* functionDecl)
return
s
;
}
std
::
string
UnnecessaryVirtual
::
fullyQualifiedName
(
const
FunctionDecl
*
functionDecl
)
{
if
(
functionDecl
->
getInstantiatedFromMemberFunction
())
functionDecl
=
functionDecl
->
getInstantiatedFromMemberFunction
();
else
if
(
functionDecl
->
getClassScopeSpecializationPattern
())
functionDecl
=
functionDecl
->
getClassScopeSpecializationPattern
();
// workaround clang-3.5 issue
#if CLANG_VERSION >= 30600
else
if
(
functionDecl
->
getTemplateInstantiationPattern
())
functionDecl
=
functionDecl
->
getTemplateInstantiationPattern
();
#endif
std
::
string
ret
=
compat
::
getReturnType
(
*
functionDecl
).
getCanonicalType
().
getAsString
();
ret
+=
" "
;
if
(
isa
<
CXXMethodDecl
>
(
functionDecl
))
{
const
CXXRecordDecl
*
recordDecl
=
dyn_cast
<
CXXMethodDecl
>
(
functionDecl
)
->
getParent
();
ret
+=
recordDecl
->
getQualifiedNameAsString
();
ret
+=
"::"
;
}
ret
+=
functionDecl
->
getNameAsString
()
+
"("
;
bool
bFirst
=
true
;
for
(
const
ParmVarDecl
*
pParmVarDecl
:
compat
::
parameters
(
*
functionDecl
))
{
if
(
bFirst
)
bFirst
=
false
;
else
ret
+=
","
;
ret
+=
pParmVarDecl
->
getType
().
getCanonicalType
().
getAsString
();
}
ret
+=
")"
;
if
(
isa
<
CXXMethodDecl
>
(
functionDecl
)
&&
dyn_cast
<
CXXMethodDecl
>
(
functionDecl
)
->
isConst
())
{
ret
+=
" const"
;
}
return
ret
;
}
bool
UnnecessaryVirtual
::
VisitCXXMethodDecl
(
const
CXXMethodDecl
*
methodDecl
)
{
if
(
ignoreLocation
(
methodDecl
))
{
...
...
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