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
8136a87d
Kaydet (Commit)
8136a87d
authored
Eki 27, 2017
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:constantparam was not always using canonical location for function
Change-Id: I8a15da534ba2cf9968cba0ee1f1bb74d7e3a0d54
üst
8a39134d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
constantparam.cxx
compilerplugins/clang/constantparam.cxx
+4
-5
No files found.
compilerplugins/clang/constantparam.cxx
Dosyayı görüntüle @
8136a87d
...
...
@@ -236,9 +236,8 @@ bool ConstantParam::VisitCallExpr(const CallExpr * callExpr) {
else
{
functionDecl
=
callExpr
->
getDirectCallee
();
}
if
(
functionDecl
==
nullptr
)
{
if
(
!
functionDecl
)
return
true
;
}
functionDecl
=
functionDecl
->
getCanonicalDecl
();
// method overrides don't always specify the same default params (although they probably should)
// so we need to work our way up to the root method
...
...
@@ -282,10 +281,10 @@ bool ConstantParam::VisitCallExpr(const CallExpr * callExpr) {
bool
ConstantParam
::
VisitDeclRefExpr
(
const
DeclRefExpr
*
declRefExpr
)
{
const
Decl
*
decl
=
declRefExpr
->
getDecl
();
if
(
!
isa
<
FunctionDecl
>
(
decl
))
{
return
true
;
}
const
FunctionDecl
*
functionDecl
=
dyn_cast
<
FunctionDecl
>
(
decl
);
if
(
!
functionDecl
)
return
true
;
functionDecl
=
functionDecl
->
getCanonicalDecl
();
for
(
unsigned
i
=
0
;
i
<
functionDecl
->
getNumParams
();
++
i
)
{
addToCallSet
(
functionDecl
,
i
,
functionDecl
->
getParamDecl
(
i
)
->
getName
(),
"unknown3"
);
...
...
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