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
733198de
Kaydet (Commit)
733198de
authored
Haz 29, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove support for Clang < 3.4
Change-Id: I81e97c5f720535b33dd3ce72d01151765e4e93a0
üst
94809ea0
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
25 additions
and
127 deletions
+25
-127
automem.cxx
compilerplugins/clang/automem.cxx
+0
-1
badvectorinit.cxx
compilerplugins/clang/badvectorinit.cxx
+0
-1
checkconfigmacros.cxx
compilerplugins/clang/checkconfigmacros.cxx
+2
-6
commaoperator.cxx
compilerplugins/clang/commaoperator.cxx
+0
-1
compat.hxx
compilerplugins/clang/compat.hxx
+0
-50
cppunitassertequals.cxx
compilerplugins/clang/cppunitassertequals.cxx
+0
-1
cstylecast.cxx
compilerplugins/clang/cstylecast.cxx
+1
-2
externandnotdefined.cxx
compilerplugins/clang/externandnotdefined.cxx
+2
-2
fpcomparison.cxx
compilerplugins/clang/fpcomparison.cxx
+0
-1
inlinesimplememberfunctions.cxx
compilerplugins/clang/inlinesimplememberfunctions.cxx
+4
-3
inlinevisible.cxx
compilerplugins/clang/inlinevisible.cxx
+0
-1
literaltoboolconversion.cxx
compilerplugins/clang/literaltoboolconversion.cxx
+1
-2
loopvartoosmall.cxx
compilerplugins/clang/loopvartoosmall.cxx
+0
-1
memoryvar.cxx
compilerplugins/clang/memoryvar.cxx
+0
-1
mergeclasses.cxx
compilerplugins/clang/mergeclasses.cxx
+0
-1
nullptr.cxx
compilerplugins/clang/nullptr.cxx
+1
-2
override.cxx
compilerplugins/clang/override.cxx
+1
-4
plugin.cxx
compilerplugins/clang/plugin.cxx
+1
-2
ptrvector.cxx
compilerplugins/clang/ptrvector.cxx
+0
-1
rangedforcopy.cxx
compilerplugins/clang/rangedforcopy.cxx
+0
-1
redundantcast.cxx
compilerplugins/clang/redundantcast.cxx
+0
-1
rendercontext.cxx
compilerplugins/clang/rendercontext.cxx
+0
-1
reservedid.cxx
compilerplugins/clang/reservedid.cxx
+0
-1
salbool.cxx
compilerplugins/clang/salbool.cxx
+5
-8
staticanonymous.cxx
compilerplugins/clang/staticanonymous.cxx
+2
-2
constantfunction.cxx
compilerplugins/clang/store/constantfunction.cxx
+0
-1
deletedspecial.cxx
compilerplugins/clang/store/deletedspecial.cxx
+1
-2
oncevar.cxx
compilerplugins/clang/store/oncevar.cxx
+0
-1
paintmethodconversion.cxx
compilerplugins/clang/store/paintmethodconversion.cxx
+0
-1
stdexception.cxx
compilerplugins/clang/store/stdexception.cxx
+1
-12
stylepolice.cxx
compilerplugins/clang/store/stylepolice.cxx
+0
-1
stringconstant.cxx
compilerplugins/clang/stringconstant.cxx
+0
-1
unreffun.cxx
compilerplugins/clang/unreffun.cxx
+3
-10
unusedfieldsremove.cxx
compilerplugins/clang/unusedfieldsremove.cxx
+0
-1
No files found.
compilerplugins/clang/automem.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -13,7 +13,6 @@
#include <fstream>
#include <set>
#include "plugin.hxx"
#include "compat.hxx"
/**
Find calls to "delete x" where x is a field on an object.
...
...
compilerplugins/clang/badvectorinit.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -13,7 +13,6 @@
#include <fstream>
#include <set>
#include "plugin.hxx"
#include "compat.hxx"
/**
...
...
compilerplugins/clang/checkconfigmacros.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -44,9 +44,7 @@ class CheckConfigMacros
virtual
void
Ifdef
(
SourceLocation
location
,
const
Token
&
macroToken
,
const
MacroDefinition
&
info
)
override
;
virtual
void
Ifndef
(
SourceLocation
location
,
const
Token
&
macroToken
,
const
MacroDefinition
&
info
)
override
;
#endif
#if CLANG_VERSION < 30400
virtual
void
Defined
(
const
Token
&
macroToken
,
const
MacroDirective
*
info
)
override
;
#elif CLANG_VERSION < 30700
#if CLANG_VERSION < 30700
virtual
void
Defined
(
const
Token
&
macroToken
,
const
MacroDirective
*
info
,
SourceRange
Range
)
override
;
#else
virtual
void
Defined
(
const
Token
&
macroToken
,
const
MacroDefinition
&
info
,
SourceRange
Range
)
override
;
...
...
@@ -108,9 +106,7 @@ void CheckConfigMacros::Ifndef( SourceLocation location, const Token& macroToken
checkMacro
(
macroToken
,
location
);
}
#if CLANG_VERSION < 30400
void
CheckConfigMacros
::
Defined
(
const
Token
&
macroToken
,
const
MacroDirective
*
)
#elif CLANG_VERSION < 30700
#if CLANG_VERSION < 30700
void
CheckConfigMacros
::
Defined
(
const
Token
&
macroToken
,
const
MacroDirective
*
,
SourceRange
)
#else
void
CheckConfigMacros
::
Defined
(
const
Token
&
macroToken
,
const
MacroDefinition
&
,
SourceRange
)
...
...
compilerplugins/clang/commaoperator.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -13,7 +13,6 @@
#include <fstream>
#include <set>
#include "plugin.hxx"
#include "compat.hxx"
/**
the comma operator is best used sparingly
...
...
compilerplugins/clang/compat.hxx
Dosyayı görüntüle @
733198de
...
...
@@ -32,14 +32,6 @@
#include "config_clang.h"
#if CLANG_VERSION >= 30400
#define LO_COMPILERPLUGINS_CLANG_COMPAT_HAVE_isAtEndOfImmediateMacroExpansion \
true
#else
#define LO_COMPILERPLUGINS_CLANG_COMPAT_HAVE_isAtEndOfImmediateMacroExpansion \
false
#endif
// Compatibility wrapper to abstract over (trivial) changes in the Clang API:
namespace
compat
{
...
...
@@ -52,30 +44,6 @@ inline bool isLookupContext(clang::DeclContext const & ctxt) {
#endif
}
inline
bool
isExternCContext
(
clang
::
DeclContext
const
&
ctxt
)
{
#if CLANG_VERSION >= 30400
return
ctxt
.
isExternCContext
();
#else
for
(
clang
::
DeclContext
const
*
c
=
&
ctxt
;
c
->
getDeclKind
()
!=
clang
::
Decl
::
TranslationUnit
;
c
=
c
->
getParent
())
{
if
(
c
->
getDeclKind
()
==
clang
::
Decl
::
LinkageSpec
)
{
return
llvm
::
cast
<
clang
::
LinkageSpecDecl
>
(
c
)
->
getLanguage
()
==
clang
::
LinkageSpecDecl
::
lang_c
;
}
}
return
false
;
#endif
}
inline
bool
isInExternCContext
(
clang
::
FunctionDecl
const
&
decl
)
{
#if CLANG_VERSION >= 30400
return
decl
.
isInExternCContext
();
#else
return
isExternCContext
(
*
decl
.
getCanonicalDecl
()
->
getDeclContext
());
#endif
}
inline
bool
forallBases
(
clang
::
CXXRecordDecl
const
&
decl
,
clang
::
CXXRecordDecl
::
ForallBasesCallback
BaseMatches
,
...
...
@@ -90,14 +58,6 @@ inline bool forallBases(
#endif
}
inline
bool
isFirstDecl
(
clang
::
FunctionDecl
const
&
decl
)
{
#if CLANG_VERSION >= 30400
return
decl
.
isFirstDecl
();
#else
return
decl
.
isFirstDeclaration
();
#endif
}
inline
clang
::
QualType
getReturnType
(
clang
::
FunctionDecl
const
&
decl
)
{
#if CLANG_VERSION >= 30500
return
decl
.
getReturnType
();
...
...
@@ -189,16 +149,6 @@ inline unsigned getBuiltinCallee(clang::CallExpr const & expr) {
#endif
}
inline
bool
isInMainFile
(
clang
::
SourceManager
const
&
manager
,
clang
::
SourceLocation
Loc
)
{
#if CLANG_VERSION >= 30400
return
manager
.
isInMainFile
(
Loc
);
#else
return
manager
.
isFromMainFile
(
Loc
);
#endif
}
inline
unsigned
getCustomDiagID
(
clang
::
DiagnosticsEngine
&
engine
,
clang
::
DiagnosticsEngine
::
Level
L
,
llvm
::
StringRef
FormatString
)
...
...
compilerplugins/clang/cppunitassertequals.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -13,7 +13,6 @@
#include <fstream>
#include <set>
#include "plugin.hxx"
#include "compat.hxx"
/**
Check for calls to CPPUNIT_ASSERT when it should be using CPPUNIT_ASSERT_EQUALS
...
...
compilerplugins/clang/cstylecast.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -10,7 +10,6 @@
#include <cassert>
#include <string>
#include "plugin.hxx"
#include "compat.hxx"
//
// We don't like using C-style casts in C++ code
...
...
@@ -76,7 +75,7 @@ bool areSimilar(QualType type1, QualType type2) {
}
bool
hasCLanguageLinkageType
(
FunctionDecl
const
*
decl
)
{
return
decl
->
isExternC
()
||
compat
::
isInExternCContext
(
*
decl
);
return
decl
->
isExternC
()
||
decl
->
isInExternCContext
(
);
}
QualType
resolvePointers
(
QualType
type
)
{
...
...
compilerplugins/clang/externandnotdefined.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -10,7 +10,6 @@
#include <string>
#include "plugin.hxx"
#include "compat.hxx"
// Having an extern prototype for a method in a module and not actually declaring that method is dodgy.
//
...
...
@@ -54,7 +53,8 @@ bool ExternAndNotDefined::VisitFunctionDecl(const FunctionDecl * functionDecl) {
if
(
functionName
==
"gdk_x11_screen_get_screen_number"
)
{
return
true
;
}
if
(
!
compat
::
isInMainFile
(
compiler
.
getSourceManager
(),
functionDecl
->
getLocation
()))
{
if
(
!
compiler
.
getSourceManager
().
isInMainFile
(
functionDecl
->
getLocation
()))
{
return
true
;
}
StringRef
fileName
{
compiler
.
getSourceManager
().
getFilename
(
functionDecl
->
getLocation
())
};
...
...
compilerplugins/clang/fpcomparison.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -14,7 +14,6 @@
#include <set>
#include "check.hxx"
#include "compat.hxx"
#include "plugin.hxx"
/**
...
...
compilerplugins/clang/inlinesimplememberfunctions.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -234,9 +234,10 @@ bool InlineSimpleMemberFunctions::rewrite(const CXXMethodDecl * functionDecl) {
// definition (in a main file only processed later) to fail
// with a "mismatch" error before the rewriter had a chance
// to act upon the definition.
if
(
!
compat
::
isInMainFile
(
compiler
.
getSourceManager
(),
compiler
.
getSourceManager
().
getSpellingLoc
(
functionDecl
->
getNameInfo
().
getLoc
())))
{
if
(
!
compiler
.
getSourceManager
().
isInMainFile
(
compiler
.
getSourceManager
().
getSpellingLoc
(
functionDecl
->
getNameInfo
().
getLoc
())))
{
return
false
;
}
...
...
compilerplugins/clang/inlinevisible.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -13,7 +13,6 @@
#include "clang/AST/Attr.h"
#include "clang/Sema/SemaInternal.h" // warn_unused_function
#include "compat.hxx"
#include "plugin.hxx"
namespace
{
...
...
compilerplugins/clang/literaltoboolconversion.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -9,7 +9,6 @@
#include "clang/Lex/Lexer.h"
#include "compat.hxx"
#include "plugin.hxx"
namespace
{
...
...
@@ -50,7 +49,7 @@ bool LiteralToBoolConversion::VisitImplicitCastExpr(
bool
LiteralToBoolConversion
::
isFromCIncludeFile
(
SourceLocation
spellingLocation
)
const
{
return
!
comp
at
::
isInMainFile
(
compiler
.
getSourceManager
(),
spellingLocation
)
return
!
comp
iler
.
getSourceManager
().
isInMainFile
(
spellingLocation
)
&&
(
StringRef
(
compiler
.
getSourceManager
().
getPresumedLoc
(
spellingLocation
)
.
getFilename
())
...
...
compilerplugins/clang/loopvartoosmall.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -11,7 +11,6 @@
#include <iostream>
#include "plugin.hxx"
#include "compat.hxx"
#include "clang/AST/CXXInheritance.h"
// Idea from bubli. Check that the index variable in a for loop is able to cover the range
...
...
compilerplugins/clang/memoryvar.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -13,7 +13,6 @@
#include <set>
#include "plugin.hxx"
#include "compat.hxx"
#include "clang/AST/CXXInheritance.h"
// Check for local variables that we are calling delete on
...
...
compilerplugins/clang/mergeclasses.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -11,7 +11,6 @@
#include <string>
#include <iostream>
#include "plugin.hxx"
#include "compat.hxx"
#include <fstream>
/**
...
...
compilerplugins/clang/nullptr.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -11,7 +11,6 @@
#include <cstdlib>
#include <set>
#include "compat.hxx"
#include "plugin.hxx"
namespace
{
...
...
@@ -209,7 +208,7 @@ bool Nullptr::isInLokIncludeFile(SourceLocation spellingLocation) const {
}
bool
Nullptr
::
isFromCIncludeFile
(
SourceLocation
spellingLocation
)
const
{
return
!
comp
at
::
isInMainFile
(
compiler
.
getSourceManager
(),
spellingLocation
)
return
!
comp
iler
.
getSourceManager
().
isInMainFile
(
spellingLocation
)
&&
(
StringRef
(
compiler
.
getSourceManager
().
getPresumedLoc
(
spellingLocation
)
.
getFilename
())
...
...
compilerplugins/clang/override.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -15,7 +15,6 @@
#include "clang/AST/Attr.h"
#include "compat.hxx"
#include "plugin.hxx"
namespace
{
...
...
@@ -46,7 +45,7 @@ bool Override::VisitCXXMethodDecl(CXXMethodDecl const * decl) {
// As a heuristic, ignore declarations where the name is spelled out in an
// ignored location; that e.g. handles uses of the Q_OBJECT macro from
// external QtCore/qobjectdefs.h:
if
(
ignoreLocation
(
decl
)
||
!
compat
::
isFirstDecl
(
*
decl
)
if
(
ignoreLocation
(
decl
)
||
!
decl
->
isFirstDecl
(
)
||
decl
->
begin_overridden_methods
()
==
decl
->
end_overridden_methods
()
||
decl
->
hasAttr
<
OverrideAttr
>
()
||
ignoreLocation
(
...
...
@@ -76,7 +75,6 @@ bool Override::VisitCXXMethodDecl(CXXMethodDecl const * decl) {
std
::
string
over
(
isInUnoIncludeFile
(
decl
->
getSourceRange
().
getBegin
())
?
"SAL_OVERRIDE"
:
"override"
);
#if LO_COMPILERPLUGINS_CLANG_COMPAT_HAVE_isAtEndOfImmediateMacroExpansion
if
(
rewriter
!=
nullptr
)
{
// In void MACRO(...); getSourceRange().getEnd() would (erroneously?)
// point at "MACRO" rather than ")", so make the loop always terminate
...
...
@@ -163,7 +161,6 @@ bool Override::VisitCXXMethodDecl(CXXMethodDecl const * decl) {
return
true
;
}
}
#endif
report
(
DiagnosticsEngine
::
Warning
,
(
"overriding virtual function declaration not marked '%0'"
),
...
...
compilerplugins/clang/plugin.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -17,7 +17,6 @@
#include <clang/Lex/Lexer.h>
#include "pluginhandler.hxx"
#include "compat.hxx"
/*
Base classes for plugin actions.
...
...
@@ -106,7 +105,7 @@ const FunctionDecl* Plugin::parentFunctionDecl( const Stmt* stmt )
bool
Plugin
::
isInUnoIncludeFile
(
SourceLocation
spellingLocation
)
const
{
StringRef
name
{
compiler
.
getSourceManager
().
getFilename
(
spellingLocation
)
};
return
comp
at
::
isInMainFile
(
compiler
.
getSourceManager
(),
spellingLocation
)
return
comp
iler
.
getSourceManager
().
isInMainFile
(
spellingLocation
)
?
(
name
==
SRCDIR
"/cppu/source/cppu/compat.cxx"
||
name
==
SRCDIR
"/cppuhelper/source/compat.cxx"
||
name
==
SRCDIR
"/sal/osl/all/compat.cxx"
)
...
...
compilerplugins/clang/ptrvector.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -13,7 +13,6 @@
#include <fstream>
#include <set>
#include "plugin.hxx"
#include "compat.hxx"
/**
Check for calls to operator== on a std::container< std::unique_ptr >, which is not useful,
...
...
compilerplugins/clang/rangedforcopy.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -12,7 +12,6 @@
#include <iostream>
#include "plugin.hxx"
#include "compat.hxx"
#include "clang/AST/CXXInheritance.h"
// Check that we're not unnecessarily copying variables in a range based for loop
...
...
compilerplugins/clang/redundantcast.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -25,7 +25,6 @@
#include "clang/Sema/Sema.h"
#include "compat.hxx"
#include "plugin.hxx"
namespace
{
...
...
compilerplugins/clang/rendercontext.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -11,7 +11,6 @@
#include <iostream>
#include "plugin.hxx"
#include "compat.hxx"
#include "clang/AST/CXXInheritance.h"
// Check for calls to OutputDevice methods that are not passing through RenderContext
...
...
compilerplugins/clang/reservedid.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -15,7 +15,6 @@
#include "clang/AST/Attr.h"
#include "compat.hxx"
#include "plugin.hxx"
namespace
{
...
...
compilerplugins/clang/salbool.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -527,8 +527,7 @@ bool SalBool::VisitParmVarDecl(ParmVarDecl const * decl) {
// where the function would still implicitly override and
// cause a compilation error due to the incompatible return
// type):
if
(
!
((
compat
::
isInMainFile
(
compiler
.
getSourceManager
(),
if
(
!
((
compiler
.
getSourceManager
().
isInMainFile
(
compiler
.
getSourceManager
().
getSpellingLoc
(
dyn_cast
<
FunctionDecl
>
(
decl
->
getDeclContext
())
...
...
@@ -587,8 +586,7 @@ bool SalBool::VisitFieldDecl(FieldDecl const * decl) {
{
TagDecl
const
*
td
=
dyn_cast
<
TagDecl
>
(
decl
->
getDeclContext
());
assert
(
td
!=
nullptr
);
if
(
!
(((
td
->
isStruct
()
||
td
->
isUnion
())
&&
compat
::
isExternCContext
(
*
td
))
if
(
!
(((
td
->
isStruct
()
||
td
->
isUnion
())
&&
td
->
isExternCContext
())
||
isInUnoIncludeFile
(
compiler
.
getSourceManager
().
getSpellingLoc
(
decl
->
getLocation
()))))
...
...
@@ -679,8 +677,7 @@ bool SalBool::VisitFunctionDecl(FunctionDecl const * decl) {
// rewriter had a chance to act upon the definition (but use the
// heuristic of assuming pure virtual functions do not have
// definitions):
if
(
!
((
compat
::
isInMainFile
(
compiler
.
getSourceManager
(),
if
(
!
((
compiler
.
getSourceManager
().
isInMainFile
(
compiler
.
getSourceManager
().
getSpellingLoc
(
decl
->
getNameInfo
().
getLoc
()))
||
f
->
isDefined
()
||
f
->
isPure
())
...
...
@@ -729,7 +726,7 @@ bool SalBool::TraverseStaticAssertDecl(StaticAssertDecl * decl) {
}
bool
SalBool
::
isFromCIncludeFile
(
SourceLocation
spellingLocation
)
const
{
return
!
comp
at
::
isInMainFile
(
compiler
.
getSourceManager
(),
spellingLocation
)
return
!
comp
iler
.
getSourceManager
().
isInMainFile
(
spellingLocation
)
&&
(
StringRef
(
compiler
.
getSourceManager
().
getPresumedLoc
(
spellingLocation
)
.
getFilename
())
...
...
@@ -737,7 +734,7 @@ bool SalBool::isFromCIncludeFile(SourceLocation spellingLocation) const {
}
bool
SalBool
::
isInSpecialMainFile
(
SourceLocation
spellingLocation
)
const
{
if
(
!
comp
at
::
isInMainFile
(
compiler
.
getSourceManager
(),
spellingLocation
))
{
if
(
!
comp
iler
.
getSourceManager
().
isInMainFile
(
spellingLocation
))
{
return
false
;
}
auto
f
=
compiler
.
getSourceManager
().
getFilename
(
spellingLocation
);
...
...
compilerplugins/clang/staticanonymous.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -6,7 +6,7 @@
*
*/
#include "plugin.hxx"
#include "compat.hxx"
/*
This is a compile check.
...
...
@@ -45,7 +45,7 @@ bool StaticAnonymous::VisitFunctionDecl( FunctionDecl* func )
return
true
;
if
(
func
->
isInAnonymousNamespace
()
)
{
if
(
!
isa
<
CXXMethodDecl
>
(
func
)
&&
!
compat
::
isInExternCContext
(
*
func
)
)
if
(
!
isa
<
CXXMethodDecl
>
(
func
)
&&
!
func
->
isInExternCContext
(
)
)
{
if
(
func
->
getStorageClass
()
==
SC_Static
)
{
...
...
compilerplugins/clang/store/constantfunction.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -8,7 +8,6 @@
*/
#include "plugin.hxx"
#include "compat.hxx"
#include <iostream>
/*
...
...
compilerplugins/clang/store/deletedspecial.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -11,7 +11,6 @@
#include <iterator>
#include <string>
#include "compat.hxx"
#include "plugin.hxx"
// Second-guess that certain private special member function declarations for
...
...
@@ -58,7 +57,7 @@ void DeletedSpecial::run() {
}
bool
DeletedSpecial
::
VisitCXXMethodDecl
(
CXXMethodDecl
const
*
decl
)
{
if
(
ignoreLocation
(
decl
)
||
!
compat
::
isFirstDecl
(
*
decl
)
||
decl
->
isDefined
()
if
(
ignoreLocation
(
decl
)
||
!
decl
->
isFirstDecl
(
)
||
decl
->
isDefined
()
||
decl
->
isDefaulted
()
||
decl
->
getAccess
()
!=
AS_private
)
{
return
true
;
...
...
compilerplugins/clang/store/oncevar.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -12,7 +12,6 @@
#include <map>
#include "plugin.hxx"
#include "compat.hxx"
#include "clang/AST/CXXInheritance.h"
// Idea from tml.
...
...
compilerplugins/clang/store/paintmethodconversion.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -9,7 +9,6 @@
#include "clang/Lex/Lexer.h"
#include "compat.hxx"
#include "plugin.hxx"
#include <iostream>
#include <fstream>
...
...
compilerplugins/clang/store/stdexception.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -33,9 +33,6 @@ public:
{
TraverseDecl
(
compiler
.
getASTContext
().
getTranslationUnitDecl
());
}
bool
VisitCXXMethodDecl
(
CXXMethodDecl
const
*
decl
);
private
:
bool
isInMainFile
(
SourceLocation
spellingLocation
)
const
;
};
bool
StdException
::
VisitCXXMethodDecl
(
CXXMethodDecl
const
*
decl
)
{
...
...
@@ -150,7 +147,7 @@ found:
// (but use the heuristic of assuming pure virtual functions do
// not have definitions):
if
(
rewriter
!=
nullptr
&&
(
isInMainFile
(
&&
(
compiler
.
getSourceManager
().
isInMainFile
(
compiler
.
getSourceManager
().
getSpellingLoc
(
loc
))
||
decl
->
isDefined
()
||
decl
->
isPure
())
&&
insertTextAfterToken
(
...
...
@@ -184,14 +181,6 @@ found:
return
true
;
}
bool
StdException
::
isInMainFile
(
SourceLocation
spellingLocation
)
const
{
#if CLANG_VERSION >= 30400
return
compiler
.
getSourceManager
().
isInMainFile
(
spellingLocation
);
#else
return
compiler
.
getSourceManager
().
isFromMainFile
(
spellingLocation
);
#endif
}
loplugin
::
Plugin
::
Registration
<
StdException
>
X
(
"stdexception"
,
true
);
}
...
...
compilerplugins/clang/store/stylepolice.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -11,7 +11,6 @@
#include <string>
#include <set>
#include "compat.hxx"
#include "plugin.hxx"
// Check for some basic naming mismatches which make the code harder to read
...
...
compilerplugins/clang/stringconstant.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -16,7 +16,6 @@
#include <iostream>
#include "check.hxx"
#include "compat.hxx"
#include "plugin.hxx"
// Define a "string constant" to be a constant expression either of type "array
...
...
compilerplugins/clang/unreffun.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -13,7 +13,6 @@
#include "clang/AST/Attr.h"
#include "clang/Sema/SemaInternal.h" // warn_unused_function
#include "compat.hxx"
#include "plugin.hxx"
namespace
{
...
...
@@ -111,10 +110,8 @@ bool UnrefFun::VisitFunctionDecl(FunctionDecl const * decl) {
//TODO: is that the first?
if
(
canon
->
isDeleted
()
||
canon
->
isReferenced
()
||
!
(
canon
->
isDefined
()
?
decl
->
isThisDeclarationADefinition
()
:
compat
::
isFirstDecl
(
*
decl
))
||
!
compat
::
isInMainFile
(
compiler
.
getSourceManager
(),
canon
->
getLocation
())
?
decl
->
isThisDeclarationADefinition
()
:
decl
->
isFirstDecl
())
||
!
compiler
.
getSourceManager
().
isInMainFile
(
canon
->
getLocation
())
||
isInUnoIncludeFile
(
compiler
.
getSourceManager
().
getSpellingLoc
(
canon
->
getNameInfo
().
getLoc
()))
...
...
@@ -141,19 +138,15 @@ bool UnrefFun::VisitFunctionDecl(FunctionDecl const * decl) {
report
(
DiagnosticsEngine
::
Warning
,
(
canon
->
isDefined
()
#if CLANG_VERSION >= 30400
?
(
canon
->
isExternallyVisible
()
?
"Unreferenced externally visible function%0 definition"
:
"Unreferenced externally invisible function%0 definition"
)
#else
?
"Unreferenced function%0 definition"
#endif
:
"Unreferenced function%0 declaration"
),
decl
->
getLocation
())
<<
(
decl
->
getTemplatedKind
()
==
FunctionDecl
::
TK_FunctionTemplate
?
" template"
:
""
)
<<
decl
->
getSourceRange
();
if
(
canon
->
isDefined
()
&&
!
compat
::
isFirstDecl
(
*
decl
))
{
if
(
canon
->
isDefined
()
&&
!
decl
->
isFirstDecl
(
))
{
report
(
DiagnosticsEngine
::
Note
,
"first declaration is here"
,
canon
->
getLocation
())
...
...
compilerplugins/clang/unusedfieldsremove.cxx
Dosyayı görüntüle @
733198de
...
...
@@ -11,7 +11,6 @@
#include <string>
#include <iostream>
#include "plugin.hxx"
#include "compat.hxx"
#include <sys/mman.h>
#include <sys/types.h>
#include <fcntl.h>
...
...
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