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
9d8d2e07
Kaydet (Commit)
9d8d2e07
authored
Eki 17, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
simplify inlineablemethods loplugin
Change-Id: I72750a14664aa042da232c35cca3373ce367cfb0
üst
a8b2bfdc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
10 deletions
+1
-10
inlineablemethods.cxx
compilerplugins/clang/inlineablemethods.cxx
+1
-10
No files found.
compilerplugins/clang/inlineablemethods.cxx
Dosyayı görüntüle @
9d8d2e07
...
@@ -103,7 +103,6 @@ private:
...
@@ -103,7 +103,6 @@ private:
std
::
string
toString
(
SourceLocation
loc
);
std
::
string
toString
(
SourceLocation
loc
);
void
functionTouchedFromExpr
(
const
FunctionDecl
*
calleeFunctionDecl
,
const
Expr
*
expr
);
void
functionTouchedFromExpr
(
const
FunctionDecl
*
calleeFunctionDecl
,
const
Expr
*
expr
);
bool
isCalleeFunctionInteresting
(
const
FunctionDecl
*
);
bool
isCalleeFunctionInteresting
(
const
FunctionDecl
*
);
void
logCalledFrom
(
SourceLocation
calleeSite
,
const
FunctionDecl
*
functionDecl
);
// I use traverse and a member variable because I cannot find a reliable way of walking back up the AST tree using the parentStmt() stuff
// I use traverse and a member variable because I cannot find a reliable way of walking back up the AST tree using the parentStmt() stuff
// TODO doesn't cope with nested functions
// TODO doesn't cope with nested functions
...
@@ -274,7 +273,7 @@ void InlineableMethods::functionTouchedFromExpr( const FunctionDecl* calleeFunct
...
@@ -274,7 +273,7 @@ void InlineableMethods::functionTouchedFromExpr( const FunctionDecl* calleeFunct
return
;
return
;
}
}
logCalledFrom
(
expr
->
getLocStart
(),
canonicalFunctionDecl
);
calledFromMap
.
emplace
(
toString
(
expr
->
getLocStart
()),
niceName
(
canonicalFunctionDecl
)
);
if
(
const
UnaryOperator
*
unaryOp
=
dyn_cast_or_null
<
UnaryOperator
>
(
parentStmt
(
expr
)))
{
if
(
const
UnaryOperator
*
unaryOp
=
dyn_cast_or_null
<
UnaryOperator
>
(
parentStmt
(
expr
)))
{
if
(
unaryOp
->
getOpcode
()
==
UO_AddrOf
)
{
if
(
unaryOp
->
getOpcode
()
==
UO_AddrOf
)
{
...
@@ -291,14 +290,6 @@ void InlineableMethods::functionTouchedFromExpr( const FunctionDecl* calleeFunct
...
@@ -291,14 +290,6 @@ void InlineableMethods::functionTouchedFromExpr( const FunctionDecl* calleeFunct
}
}
}
}
void
InlineableMethods
::
logCalledFrom
(
SourceLocation
calleeLoc
,
const
FunctionDecl
*
functionDecl
)
{
functionDecl
=
functionDecl
->
getCanonicalDecl
();
while
(
functionDecl
->
getTemplateInstantiationPattern
())
functionDecl
=
functionDecl
->
getTemplateInstantiationPattern
();
calledFromMap
.
emplace
(
toString
(
calleeLoc
),
niceName
(
functionDecl
));
}
bool
InlineableMethods
::
isCalleeFunctionInteresting
(
const
FunctionDecl
*
functionDecl
)
bool
InlineableMethods
::
isCalleeFunctionInteresting
(
const
FunctionDecl
*
functionDecl
)
{
{
// ignore stuff that forms part of the stable URE interface
// ignore stuff that forms part of the stable URE interface
...
...
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