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
e0686cb7
Kaydet (Commit)
e0686cb7
authored
Nis 17, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
workaround ErrorContextImpl in vclwidget clang plugin
Change-Id: I6c0265f33a88169708d0812639169b665a95fc1f
üst
5cc560f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
vclwidgets.cxx
compilerplugins/clang/vclwidgets.cxx
+10
-7
No files found.
compilerplugins/clang/vclwidgets.cxx
Dosyayı görüntüle @
e0686cb7
...
@@ -265,13 +265,17 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) {
...
@@ -265,13 +265,17 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) {
if
(
fieldDecl
->
isBitField
())
{
if
(
fieldDecl
->
isBitField
())
{
return
true
;
return
true
;
}
}
const
CXXRecordDecl
*
pParentRecordDecl
=
dyn_cast
<
CXXRecordDecl
>
(
fieldDecl
->
getParent
());
if
(
containsWindowSubclass
(
fieldDecl
->
getType
()))
{
if
(
containsWindowSubclass
(
fieldDecl
->
getType
()))
{
report
(
// have to ignore this for now, nasty reverse dependency from tools->vcl
DiagnosticsEngine
::
Warning
,
if
(
!
(
pParentRecordDecl
!=
nullptr
&&
pParentRecordDecl
->
getQualifiedNameAsString
()
==
"ErrorContextImpl"
))
{
"OutputDevice subclass declared as a pointer field, should be wrapped in VclPtr."
+
fieldDecl
->
getType
().
getAsString
(),
report
(
fieldDecl
->
getLocation
())
DiagnosticsEngine
::
Warning
,
<<
fieldDecl
->
getSourceRange
();
"OutputDevice subclass declared as a pointer field, should be wrapped in VclPtr."
+
fieldDecl
->
getType
().
getAsString
(),
return
true
;
fieldDecl
->
getLocation
())
<<
fieldDecl
->
getSourceRange
();
return
true
;
}
}
}
const
RecordType
*
recordType
=
fieldDecl
->
getType
()
->
getAs
<
RecordType
>
();
const
RecordType
*
recordType
=
fieldDecl
->
getType
()
->
getAs
<
RecordType
>
();
if
(
recordType
==
nullptr
)
{
if
(
recordType
==
nullptr
)
{
...
@@ -292,7 +296,6 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) {
...
@@ -292,7 +296,6 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) {
}
}
// If this field is a VclPtr field, then the class MUST have a dispose method
// If this field is a VclPtr field, then the class MUST have a dispose method
const
CXXRecordDecl
*
pParentRecordDecl
=
dyn_cast
<
CXXRecordDecl
>
(
fieldDecl
->
getParent
());
if
(
pParentRecordDecl
&&
isDerivedFromWindow
(
pParentRecordDecl
)
if
(
pParentRecordDecl
&&
isDerivedFromWindow
(
pParentRecordDecl
)
&&
startsWith
(
recordDecl
->
getQualifiedNameAsString
(),
"VclPtr"
))
&&
startsWith
(
recordDecl
->
getQualifiedNameAsString
(),
"VclPtr"
))
{
{
...
...
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