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
411fcfff
Kaydet (Commit)
411fcfff
authored
Şub 21, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ParentBuilder needs support for ObjCMethodDecl
Change-Id: I8883649da31eabbc5a0f9780fb953ad58f154e1e
üst
278409c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
plugin.cxx
compilerplugins/clang/plugin.cxx
+15
-0
No files found.
compilerplugins/clang/plugin.cxx
Dosyayı görüntüle @
411fcfff
...
...
@@ -60,6 +60,7 @@ const Stmt* Plugin::parentStmt( const Stmt* stmt )
{
if
(
parents
.
empty
())
buildParents
(
compiler
);
if
(
parents
.
count
(
stmt
)
!=
1
)
stmt
->
dump
();
assert
(
parents
.
count
(
stmt
)
==
1
);
return
parents
[
stmt
];
}
...
...
@@ -79,6 +80,7 @@ class ParentBuilder
{
public
:
bool
VisitFunctionDecl
(
const
FunctionDecl
*
function
);
bool
VisitObjCMethodDecl
(
const
ObjCMethodDecl
*
method
);
void
walk
(
const
Stmt
*
stmt
);
unordered_map
<
const
Stmt
*
,
const
Stmt
*
>*
parents
;
};
...
...
@@ -107,6 +109,19 @@ bool ParentBuilder::VisitFunctionDecl( const FunctionDecl* function )
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
();
...
...
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