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
1dc43e24
Kaydet (Commit)
1dc43e24
authored
Ara 22, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Generalize vector/deque ctor checks to work with MSVCRT
Change-Id: I2d493a36b8c2e3abe69964c04b46f08d67ef8a48
üst
4a591d74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
badvectorinit.cxx
compilerplugins/clang/store/badvectorinit.cxx
+5
-4
No files found.
compilerplugins/clang/store/badvectorinit.cxx
Dosyayı görüntüle @
1dc43e24
...
@@ -178,12 +178,13 @@ bool BadVectorInit::VisitCXXConstructExpr(const CXXConstructExpr* expr)
...
@@ -178,12 +178,13 @@ bool BadVectorInit::VisitCXXConstructExpr(const CXXConstructExpr* expr)
if
(
aParentName
.
find
(
"vector"
)
==
string
::
npos
&&
aParentName
.
find
(
"deque"
)
==
string
::
npos
)
if
(
aParentName
.
find
(
"vector"
)
==
string
::
npos
&&
aParentName
.
find
(
"deque"
)
==
string
::
npos
)
return
true
;
return
true
;
// ignore the copy constructor
// ignore the copy/move constructors, and those taking an initializer_list
// etc.:
if
(
consDecl
->
isCopyConstructor
()
||
consDecl
->
isMoveConstructor
())
return
true
;
const
ParmVarDecl
*
pParam
=
consDecl
->
getParamDecl
(
0
);
const
ParmVarDecl
*
pParam
=
consDecl
->
getParamDecl
(
0
);
std
::
string
aParam1
=
pParam
->
getOriginalType
().
getAsString
();
std
::
string
aParam1
=
pParam
->
getOriginalType
().
getAsString
();
if
(
aParam1
.
find
(
"vector"
)
!=
string
::
npos
if
(
aParam1
.
find
(
"initializer_list"
)
!=
string
::
npos
||
aParam1
.
find
(
"deque"
)
!=
string
::
npos
||
aParam1
.
find
(
"initializer_list"
)
!=
string
::
npos
||
aParam1
.
find
(
"iterator"
)
!=
string
::
npos
)
||
aParam1
.
find
(
"iterator"
)
!=
string
::
npos
)
return
true
;
return
true
;
...
...
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