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
c5616014
Kaydet (Commit)
c5616014
authored
Agu 25, 2017
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:redundantcast: suppress warnings in reworked glibc assert macro
Change-Id: I20be230b3ff5d11395f33a9896d0a575c3051fb7
üst
682f05f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
redundantcast.cxx
compilerplugins/clang/redundantcast.cxx
+14
-0
No files found.
compilerplugins/clang/redundantcast.cxx
Dosyayı görüntüle @
c5616014
...
@@ -439,6 +439,20 @@ bool RedundantCast::VisitCXXStaticCastExpr(CXXStaticCastExpr const * expr) {
...
@@ -439,6 +439,20 @@ bool RedundantCast::VisitCXXStaticCastExpr(CXXStaticCastExpr const * expr) {
{
{
return
true
;
return
true
;
}
}
// Suppress warnings from static_cast<bool> in C++ definition of assert in
// <https://sourceware.org/git/?p=glibc.git;a=commit;
// h=b5889d25e9bf944a89fdd7bcabf3b6c6f6bb6f7c> "assert: Support types
// without operator== (int) [BZ #21972]":
if
(
t1
->
isBooleanType
()
&&
t2
->
isBooleanType
())
{
auto
loc
=
expr
->
getLocStart
();
if
(
compiler
.
getSourceManager
().
isMacroBodyExpansion
(
loc
)
&&
(
Lexer
::
getImmediateMacroName
(
loc
,
compiler
.
getSourceManager
(),
compiler
.
getLangOpts
())
==
"assert"
))
{
return
true
;
}
}
report
(
report
(
DiagnosticsEngine
::
Warning
,
DiagnosticsEngine
::
Warning
,
(
"static_cast from %0 %1 to %2 %3 is redundant%select{| or should be"
(
"static_cast from %0 %1 to %2 %3 is redundant%select{| or should be"
...
...
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