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
08967d36
Kaydet (Commit)
08967d36
authored
May 07, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
workaround for clang3.2 in vclwidgets clang plugin
Change-Id: I7ac67dd14d14a93fe163febe0f18df56dd613376
üst
4eeaaf84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
vclwidgets.cxx
compilerplugins/clang/vclwidgets.cxx
+16
-7
No files found.
compilerplugins/clang/vclwidgets.cxx
Dosyayı görüntüle @
08967d36
...
...
@@ -186,16 +186,25 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD
}
// check that the destructor for a OutputDevice subclass does nothing except call into the disposeOnce() method
bool
ok
=
false
;
if
(
pCompoundStatement
&&
pCompoundStatement
->
size
()
==
1
)
{
const
CXXMemberCallExpr
*
pCallExpr
=
dyn_cast
<
CXXMemberCallExpr
>
(
*
pCompoundStatement
->
body_begin
());
if
(
pCallExpr
)
{
if
(
const
FunctionDecl
*
func
=
pCallExpr
->
getDirectCallee
())
{
if
(
func
->
getNumParams
()
==
0
&&
func
->
getIdentifier
()
!=
NULL
&&
(
func
->
getName
()
==
"disposeOnce"
))
{
ok
=
true
;
if
(
pCompoundStatement
)
{
bool
bFoundDisposeOnce
=
false
;
int
nNumExtraStatements
=
0
;
for
(
auto
const
*
x
:
pCompoundStatement
->
body
())
{
const
CXXMemberCallExpr
*
pCallExpr
=
dyn_cast
<
CXXMemberCallExpr
>
(
x
);
if
(
pCallExpr
)
{
if
(
const
FunctionDecl
*
func
=
pCallExpr
->
getDirectCallee
())
{
if
(
func
->
getNumParams
()
==
0
&&
func
->
getIdentifier
()
!=
NULL
&&
(
func
->
getName
()
==
"disposeOnce"
))
{
bFoundDisposeOnce
=
true
;
}
}
}
// checking for ParenExpr is a hacky way to ignore assert statements in older versions of clang (i.e. <= 3.2)
if
(
!
pCallExpr
&&
!
dyn_cast
<
ParenExpr
>
(
x
))
nNumExtraStatements
++
;
}
ok
=
bFoundDisposeOnce
&&
nNumExtraStatements
==
0
;
}
if
(
!
ok
)
{
SourceLocation
spellingLocation
=
compiler
.
getSourceManager
().
getSpellingLoc
(
...
...
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