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
744c9247
Kaydet (Commit)
744c9247
authored
Tem 11, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Adapt to Clang 3.4 again
Change-Id: I33c1cee01593b06efca6e1aae283ce80d5cd77be
üst
d1c0a77e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
vclwidgets.cxx
compilerplugins/clang/vclwidgets.cxx
+11
-7
No files found.
compilerplugins/clang/vclwidgets.cxx
Dosyayı görüntüle @
744c9247
...
...
@@ -379,8 +379,10 @@ static void findDisposeAndClearStatements(std::set<const FieldDecl*>& aVclPtrFie
return
;
if
(
isa
<
CompoundStmt
>
(
pStmt
))
{
const
CompoundStmt
*
pCompoundStatement
=
dyn_cast
<
CompoundStmt
>
(
pStmt
);
for
(
const
Stmt
*
pStmt
:
pCompoundStatement
->
body
())
{
findDisposeAndClearStatements
(
aVclPtrFields
,
pStmt
);
for
(
auto
i
=
pCompoundStatement
->
body_begin
();
i
!=
pCompoundStatement
->
body_end
();
++
i
)
{
findDisposeAndClearStatements
(
aVclPtrFields
,
*
i
);
}
return
;
}
...
...
@@ -459,22 +461,24 @@ bool VCLWidgets::VisitFunctionDecl( const FunctionDecl* functionDecl )
return
true
;
std
::
set
<
const
FieldDecl
*>
aVclPtrFields
;
for
(
const
auto
&
fieldDecl
:
pMethodDecl
->
getParent
()
->
fields
())
{
auto
const
type
=
loplugin
::
TypeCheck
(
fieldDecl
->
getType
());
for
(
auto
i
=
pMethodDecl
->
getParent
()
->
field_begin
();
i
!=
pMethodDecl
->
getParent
()
->
field_end
();
++
i
)
{
auto
const
type
=
loplugin
::
TypeCheck
((
*
i
)
->
getType
());
if
(
type
.
Class
(
"VclPtr"
).
GlobalNamespace
())
{
aVclPtrFields
.
insert
(
fieldDecl
);
aVclPtrFields
.
insert
(
*
i
);
}
else
if
(
type
.
Class
(
"vector"
).
StdNamespace
()
||
type
.
Class
(
"map"
).
StdNamespace
()
||
type
.
Class
(
"list"
).
StdNamespace
()
||
type
.
Class
(
"set"
).
StdNamespace
())
{
const
RecordType
*
recordType
=
dyn_cast_or_null
<
RecordType
>
(
fieldDecl
->
getType
()
->
getUnqualifiedDesugaredType
());
const
RecordType
*
recordType
=
dyn_cast_or_null
<
RecordType
>
(
(
*
i
)
->
getType
()
->
getUnqualifiedDesugaredType
());
if
(
recordType
)
{
auto
d
=
dyn_cast
<
ClassTemplateSpecializationDecl
>
(
recordType
->
getDecl
());
if
(
d
&&
d
->
getTemplateArgs
().
size
()
>
0
)
{
auto
const
type
=
loplugin
::
TypeCheck
(
d
->
getTemplateArgs
()[
0
].
getAsType
());
if
(
type
.
Class
(
"VclPtr"
).
GlobalNamespace
())
{
aVclPtrFields
.
insert
(
fieldDecl
);
aVclPtrFields
.
insert
(
*
i
);
}
}
}
...
...
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