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
cbd1f369
Kaydet (Commit)
cbd1f369
authored
Mar 26, 2018
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use isSamePathname instead of hasPathnamePrefix, where appropriate
Change-Id: I75f32fc66877c0fb1e71be3b5e8b6d6c1b9c4d36
üst
add1784e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
24 deletions
+24
-24
blockblock.cxx
compilerplugins/clang/blockblock.cxx
+1
-1
checkunusedparams.cxx
compilerplugins/clang/checkunusedparams.cxx
+4
-4
convertlong.cxx
compilerplugins/clang/convertlong.cxx
+3
-3
memoryvar.cxx
compilerplugins/clang/memoryvar.cxx
+1
-1
useuniqueptr.cxx
compilerplugins/clang/useuniqueptr.cxx
+11
-11
vclwidgets.cxx
compilerplugins/clang/vclwidgets.cxx
+4
-4
No files found.
compilerplugins/clang/blockblock.cxx
Dosyayı görüntüle @
cbd1f369
...
...
@@ -30,7 +30,7 @@ public:
{
StringRef
fn
(
compiler
.
getSourceManager
().
getFileEntryForID
(
compiler
.
getSourceManager
().
getMainFileID
())
->
getName
()
);
if
(
loplugin
::
hasPathnamePrefix
(
fn
,
SRCDIR
"/sal/osl/unx/file_misc.cxx"
))
if
(
loplugin
::
isSamePathname
(
fn
,
SRCDIR
"/sal/osl/unx/file_misc.cxx"
))
return
;
TraverseDecl
(
compiler
.
getASTContext
().
getTranslationUnitDecl
());
...
...
compilerplugins/clang/checkunusedparams.cxx
Dosyayı görüntüle @
cbd1f369
...
...
@@ -68,16 +68,16 @@ void CheckUnusedParams::run()
if
(
loplugin
::
hasPathnamePrefix
(
fn
,
SRCDIR
"/xmloff/"
))
return
;
// I believe someone is busy working on this chunk of code
if
(
loplugin
::
hasPathnamePrefix
(
fn
,
SRCDIR
"/sc/source/ui/docshell/dataprovider.cxx"
))
if
(
loplugin
::
isSamePathname
(
fn
,
SRCDIR
"/sc/source/ui/docshell/dataprovider.cxx"
))
return
;
// I think erack is working on stuff here
if
(
loplugin
::
hasPathnamePrefix
(
fn
,
SRCDIR
"/sc/source/filter/excel/xiformula.cxx"
))
if
(
loplugin
::
isSamePathname
(
fn
,
SRCDIR
"/sc/source/filter/excel/xiformula.cxx"
))
return
;
// lots of callbacks here
if
(
loplugin
::
hasPathnamePrefix
(
fn
,
SRCDIR
"/sc/source/filter/lotus/op.cxx"
))
if
(
loplugin
::
isSamePathname
(
fn
,
SRCDIR
"/sc/source/filter/lotus/op.cxx"
))
return
;
// template magic
if
(
loplugin
::
hasPathnamePrefix
(
fn
,
SRCDIR
"/sc/source/filter/html/htmlpars.cxx"
))
if
(
loplugin
::
isSamePathname
(
fn
,
SRCDIR
"/sc/source/filter/html/htmlpars.cxx"
))
return
;
m_phase
=
PluginPhase
::
FindAddressOf
;
...
...
compilerplugins/clang/convertlong.cxx
Dosyayı görüntüle @
cbd1f369
...
...
@@ -75,11 +75,11 @@ bool ConvertLong::VisitVarDecl(VarDecl const* varDecl)
if
(
ignoreLocation
(
varDecl
))
return
true
;
StringRef
fileName
{
compiler
.
getSourceManager
().
getFilename
(
varDecl
->
getLocation
())
};
if
(
loplugin
::
hasPathnamePrefix
(
fileName
,
SRCDIR
"/include/tools/bigint.hxx"
))
if
(
loplugin
::
isSamePathname
(
fileName
,
SRCDIR
"/include/tools/bigint.hxx"
))
return
true
;
if
(
loplugin
::
hasPathnamePrefix
(
fileName
,
SRCDIR
"/include/tools/solar.h"
))
if
(
loplugin
::
isSamePathname
(
fileName
,
SRCDIR
"/include/tools/solar.h"
))
return
true
;
if
(
loplugin
::
hasPathnamePrefix
(
fileName
,
SRCDIR
"/include/o3tl/string_view.hxx"
))
if
(
loplugin
::
isSamePathname
(
fileName
,
SRCDIR
"/include/o3tl/string_view.hxx"
))
return
true
;
if
(
!
varDecl
->
hasInit
())
return
true
;
...
...
compilerplugins/clang/memoryvar.cxx
Dosyayı görüntüle @
cbd1f369
...
...
@@ -83,7 +83,7 @@ bool MemoryVar::TraverseFunctionDecl(FunctionDecl * decl)
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/vcl/source/filter"
))
{
return
true
;
}
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/sw/source/core/layout/frmtool.cxx"
))
{
if
(
loplugin
::
isSamePathname
(
aFileName
,
SRCDIR
"/sw/source/core/layout/frmtool.cxx"
))
{
return
true
;
}
...
...
compilerplugins/clang/useuniqueptr.cxx
Dosyayı görüntüle @
cbd1f369
...
...
@@ -170,22 +170,22 @@ void UseUniquePtr::CheckDeleteExpr(const CXXDestructorDecl* destructorDecl, cons
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
WORKDIR
))
return
;
// passes and stores pointers to member fields
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/sot/source/sdstor/stgdir.hxx"
))
if
(
loplugin
::
isSamePathname
(
aFileName
,
SRCDIR
"/sot/source/sdstor/stgdir.hxx"
))
return
;
// something platform-specific
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/hwpfilter/source/htags.h"
))
if
(
loplugin
::
isSamePathname
(
aFileName
,
SRCDIR
"/hwpfilter/source/htags.h"
))
return
;
// passes pointers to member fields
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/sd/inc/sdpptwrp.hxx"
))
if
(
loplugin
::
isSamePathname
(
aFileName
,
SRCDIR
"/sd/inc/sdpptwrp.hxx"
))
return
;
// @TODO intrusive linked-lists here, with some trickiness
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/sw/source/filter/html/parcss1.hxx"
))
if
(
loplugin
::
isSamePathname
(
aFileName
,
SRCDIR
"/sw/source/filter/html/parcss1.hxx"
))
return
;
// @TODO SwDoc has some weird ref-counting going on
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/sw/inc/shellio.hxx"
))
if
(
loplugin
::
isSamePathname
(
aFileName
,
SRCDIR
"/sw/inc/shellio.hxx"
))
return
;
// @TODO it's sharing pointers with another class
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/sc/inc/formulacell.hxx"
))
if
(
loplugin
::
isSamePathname
(
aFileName
,
SRCDIR
"/sc/inc/formulacell.hxx"
))
return
;
// some weird stuff going on here around struct Entity
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/sax/"
))
...
...
@@ -198,23 +198,23 @@ void UseUniquePtr::CheckDeleteExpr(const CXXDestructorDecl* destructorDecl, cons
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/include/sot/"
))
return
;
// the std::vector is being passed to another class
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/sfx2/source/explorer/nochaos.cxx"
))
if
(
loplugin
::
isSamePathname
(
aFileName
,
SRCDIR
"/sfx2/source/explorer/nochaos.cxx"
))
return
;
// ignore std::map and std::unordered_map, MSVC 2015 has problems with mixing these with std::unique_ptr
auto
tc
=
loplugin
::
TypeCheck
(
fieldDecl
->
getType
());
if
(
tc
.
Class
(
"map"
).
StdNamespace
()
||
tc
.
Class
(
"unordered_map"
).
StdNamespace
())
return
;
// there is a loop in ~ImplPrnQueueList deleting stuff on a global data structure
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/vcl/inc/print.h"
))
if
(
loplugin
::
isSamePathname
(
aFileName
,
SRCDIR
"/vcl/inc/print.h"
))
return
;
// painful linked list
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/basic/source/inc/runtime.hxx"
))
if
(
loplugin
::
isSamePathname
(
aFileName
,
SRCDIR
"/basic/source/inc/runtime.hxx"
))
return
;
// not sure how the node management is working here
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/i18npool/source/localedata/saxparser.cxx"
))
if
(
loplugin
::
isSamePathname
(
aFileName
,
SRCDIR
"/i18npool/source/localedata/saxparser.cxx"
))
return
;
// has a pointer that it only sometimes owns
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/editeng/source/editeng/impedit.hxx"
))
if
(
loplugin
::
isSamePathname
(
aFileName
,
SRCDIR
"/editeng/source/editeng/impedit.hxx"
))
return
;
report
(
...
...
compilerplugins/clang/vclwidgets.cxx
Dosyayı görüntüle @
cbd1f369
...
...
@@ -240,9 +240,9 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD
SourceLocation
spellingLocation
=
compiler
.
getSourceManager
().
getSpellingLoc
(
pCXXDestructorDecl
->
getLocStart
());
StringRef
filename
=
compiler
.
getSourceManager
().
getFilename
(
spellingLocation
);
if
(
!
(
loplugin
::
hasPathnamePrefix
(
filename
,
SRCDIR
"/vcl/source/window/window.cxx"
))
&&
!
(
loplugin
::
hasPathnamePrefix
(
filename
,
SRCDIR
"/vcl/source/gdi/virdev.cxx"
))
&&
!
(
loplugin
::
hasPathnamePrefix
(
filename
,
SRCDIR
"/vcl/qa/cppunit/lifecycle.cxx"
))
)
if
(
!
(
loplugin
::
isSamePathname
(
filename
,
SRCDIR
"/vcl/source/window/window.cxx"
))
&&
!
(
loplugin
::
isSamePathname
(
filename
,
SRCDIR
"/vcl/source/gdi/virdev.cxx"
))
&&
!
(
loplugin
::
isSamePathname
(
filename
,
SRCDIR
"/vcl/qa/cppunit/lifecycle.cxx"
))
)
{
report
(
DiagnosticsEngine
::
Warning
,
...
...
@@ -670,7 +670,7 @@ bool VCLWidgets::VisitCXXDeleteExpr(const CXXDeleteExpr *pCXXDeleteExpr)
SourceLocation
spellingLocation
=
compiler
.
getSourceManager
().
getSpellingLoc
(
pCXXDeleteExpr
->
getLocStart
());
StringRef
filename
=
compiler
.
getSourceManager
().
getFilename
(
spellingLocation
);
if
(
!
(
loplugin
::
hasPathnamePrefix
(
filename
,
SRCDIR
"/include/vcl/vclreferencebase.hxx"
)))
if
(
!
(
loplugin
::
isSamePathname
(
filename
,
SRCDIR
"/include/vcl/vclreferencebase.hxx"
)))
{
report
(
DiagnosticsEngine
::
Warning
,
...
...
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