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
4a6268f0
Kaydet (Commit)
4a6268f0
authored
Kas 19, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Adapt compilerplugins to old Clang versions
Change-Id: I91335f1e81e251f0578792517dded9fae239fb61
üst
e6d21d08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
compat.hxx
compilerplugins/clang/compat.hxx
+9
-0
typecheck.hxx
compilerplugins/clang/typecheck.hxx
+3
-3
No files found.
compilerplugins/clang/compat.hxx
Dosyayı görüntüle @
4a6268f0
...
@@ -41,6 +41,15 @@
...
@@ -41,6 +41,15 @@
// Compatibility wrapper to abstract over (trivial) changes in the Clang API:
// Compatibility wrapper to abstract over (trivial) changes in the Clang API:
namespace
compat
{
namespace
compat
{
inline
bool
isLookupContext
(
clang
::
DeclContext
const
&
ctxt
)
{
#if (__clang_major__ == 3 && __clang_minor__ > 7) || __clang_major__ > 3
return
ctxt
.
isLookupContext
();
#else
return
!
ctxt
.
isFunctionOrMethod
()
&&
ctxt
.
getDeclKind
()
!=
clang
::
Decl
::
LinkageSpec
;
#endif
}
inline
bool
isExternCContext
(
clang
::
DeclContext
const
&
ctxt
)
{
inline
bool
isExternCContext
(
clang
::
DeclContext
const
&
ctxt
)
{
#if (__clang_major__ == 3 && __clang_minor__ >= 4) || __clang_major__ > 3
#if (__clang_major__ == 3 && __clang_minor__ >= 4) || __clang_major__ > 3
return
ctxt
.
isExternCContext
();
return
ctxt
.
isExternCContext
();
...
...
compilerplugins/clang/typecheck.hxx
Dosyayı görüntüle @
4a6268f0
...
@@ -12,11 +12,11 @@
...
@@ -12,11 +12,11 @@
#include <cstddef>
#include <cstddef>
#include <iostream>
#include <clang/AST/DeclBase.h>
#include <clang/AST/DeclBase.h>
#include <clang/AST/Type.h>
#include <clang/AST/Type.h>
#include "compat.hxx"
namespace
loplugin
{
namespace
loplugin
{
class
NamespaceCheck
;
class
NamespaceCheck
;
...
@@ -72,7 +72,7 @@ public:
...
@@ -72,7 +72,7 @@ public:
TerminalCheck
GlobalNamespace
()
const
{
TerminalCheck
GlobalNamespace
()
const
{
return
TerminalCheck
(
return
TerminalCheck
(
context_
!=
nullptr
context_
!=
nullptr
&&
((
co
ntext_
->
isLookupContext
(
)
&&
((
co
mpat
::
isLookupContext
(
*
context_
)
?
context_
:
context_
->
getLookupParent
())
?
context_
:
context_
->
getLookupParent
())
->
isTranslationUnit
()));
->
isTranslationUnit
()));
}
}
...
...
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