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
e3e66f7b
Kaydet (Commit)
e3e66f7b
authored
Agu 26, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Minor improvements of loplugin:staticaccess
Change-Id: I731aab418fb42922208afdaa60d98ccd76377dab
üst
aa67fed5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
staticaccess.cxx
compilerplugins/clang/staticaccess.cxx
+5
-2
No files found.
compilerplugins/clang/staticaccess.cxx
Dosyayı görüntüle @
e3e66f7b
...
...
@@ -18,7 +18,9 @@ bool isStatic(ValueDecl const * decl, bool * memberEnumerator) {
// clang::MemberExpr::getMemberDecl is documented to return either a
// FieldDecl or a CXXMethodDecl, but can apparently also return a VarDecl
// (as C++ static data members are modeled by VarDecl, not FieldDecl) or an
// EnumConstantDecl (struct { enum {E}; } s; s.E;):
// EnumConstantDecl (struct { enum {E}; } s; s.E;), see
// <https://reviews.llvm.org/D23907> "Fix documentation of
// MemberExpr::getMemberDecl":
auto
fd
=
dyn_cast
<
FieldDecl
>
(
decl
);
if
(
fd
!=
nullptr
)
{
*
memberEnumerator
=
false
;
...
...
@@ -27,7 +29,8 @@ bool isStatic(ValueDecl const * decl, bool * memberEnumerator) {
auto
vd
=
dyn_cast
<
VarDecl
>
(
decl
);
if
(
vd
!=
nullptr
)
{
*
memberEnumerator
=
false
;
return
vd
->
isStaticDataMember
();
assert
(
vd
->
isStaticDataMember
());
return
true
;
}
auto
md
=
dyn_cast
<
CXXMethodDecl
>
(
decl
);
if
(
md
!=
nullptr
)
{
...
...
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