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
5670f65c
Kaydet (Commit)
5670f65c
authored
Eki 27, 2017
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
-Werror=unused-function
Change-Id: I2858c6cb74b96ffe6a799dc2ab02cbbe1c56abc7
üst
bb72ef2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
67 deletions
+0
-67
plugin.cxx
compilerplugins/clang/plugin.cxx
+0
-67
No files found.
compilerplugins/clang/plugin.cxx
Dosyayı görüntüle @
5670f65c
...
...
@@ -186,73 +186,6 @@ bool Plugin::isInUnoIncludeFile(const FunctionDecl* functionDecl) const
functionDecl
->
getCanonicalDecl
()
->
getNameInfo
().
getLoc
()));
}
namespace
{
class
ParentBuilder
:
public
RecursiveASTVisitor
<
ParentBuilder
>
{
public
:
bool
VisitFunctionDecl
(
const
FunctionDecl
*
function
);
bool
VisitObjCMethodDecl
(
const
ObjCMethodDecl
*
method
);
void
walk
(
const
Stmt
*
stmt
);
bool
shouldVisitTemplateInstantiations
()
const
{
return
true
;
}
std
::
unordered_map
<
const
Stmt
*
,
const
Stmt
*
>*
parents
;
};
bool
ParentBuilder
::
VisitFunctionDecl
(
const
FunctionDecl
*
function
)
{
// if( ignoreLocation( declaration ))
// return true; ???
if
(
function
->
doesThisDeclarationHaveABody
()
&&
!
function
->
isLateTemplateParsed
())
{
const
Stmt
*
body
=
function
->
getBody
();
(
*
parents
)[
body
]
=
NULL
;
// no parent
walk
(
body
);
}
if
(
const
CXXConstructorDecl
*
ctor
=
dyn_cast
<
CXXConstructorDecl
>
(
function
))
{
for
(
CXXConstructorDecl
::
init_const_iterator
it
=
ctor
->
init_begin
();
it
!=
ctor
->
init_end
();
++
it
)
{
const
Expr
*
init_expression
=
(
*
it
)
->
getInit
();
(
*
parents
)[
init_expression
]
=
NULL
;
walk
(
init_expression
);
}
}
return
true
;
}
bool
ParentBuilder
::
VisitObjCMethodDecl
(
const
ObjCMethodDecl
*
method
)
{
// if( ignoreLocation( declaration ))
// return true; ???
if
(
method
->
hasBody
())
{
const
Stmt
*
body
=
method
->
getBody
();
(
*
parents
)[
body
]
=
NULL
;
// no parent
walk
(
body
);
}
return
true
;
}
void
ParentBuilder
::
walk
(
const
Stmt
*
stmt
)
{
for
(
ConstStmtIterator
it
=
stmt
->
child_begin
();
it
!=
stmt
->
child_end
();
++
it
)
{
if
(
*
it
!=
NULL
)
{
(
*
parents
)[
*
it
]
=
stmt
;
walk
(
*
it
);
}
}
}
}
// namespace
SourceLocation
Plugin
::
locationAfterToken
(
SourceLocation
location
)
{
return
Lexer
::
getLocForEndOfToken
(
location
,
0
,
compiler
.
getSourceManager
(),
compiler
.
getLangOpts
());
...
...
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