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
35d9cd49
Kaydet (Commit)
35d9cd49
authored
Eki 16, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
clang::FileEntry::getName now returns StringRef on Clang master
Change-Id: I94c9676e52a3c60ad70567396a8484e844176c6e
üst
9a0e3d1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
pluginhandler.cxx
compilerplugins/clang/pluginhandler.cxx
+8
-8
No files found.
compilerplugins/clang/pluginhandler.cxx
Dosyayı görüntüle @
35d9cd49
...
...
@@ -171,9 +171,8 @@ void PluginHandler::HandleTranslationUnit( ASTContext& context )
{
if
(
context
.
getDiagnostics
().
hasErrorOccurred
())
return
;
char
const
*
const
mainFileName
=
context
.
getSourceManager
().
getFileEntryForID
(
context
.
getSourceManager
().
getMainFileID
())
->
getName
();
size_t
const
len
=
strlen
(
mainFileName
);
if
(
len
>
3
&&
strncmp
(
mainFileName
+
len
-
3
,
".ii"
,
3
)
==
0
)
StringRef
const
mainFileName
=
context
.
getSourceManager
().
getFileEntryForID
(
context
.
getSourceManager
().
getMainFileID
())
->
getName
();
if
(
mainFileName
.
endswith
(
".ii"
))
{
report
(
DiagnosticsEngine
::
Fatal
,
"input file has suffix .ii:
\"
%0
\"\n
highly suspicious, probably ccache generated, this will break warning suppressions; export CCACHE_CPP2=1 to prevent this"
)
<<
mainFileName
;
...
...
@@ -201,11 +200,12 @@ void PluginHandler::HandleTranslationUnit( ASTContext& context )
string
modifyFile
;
const
char
*
pathWarning
=
NULL
;
bool
bSkip
=
false
;
if
(
strncmp
(
e
->
getName
(),
WORKDIR
"/"
,
strlen
(
WORKDIR
"/"
))
==
0
)
StringRef
const
name
=
e
->
getName
();
if
(
name
.
startswith
(
WORKDIR
"/"
)
)
pathWarning
=
"modified source in workdir/ : %0"
;
else
if
(
strcmp
(
SRCDIR
,
BUILDDIR
)
!=
0
&&
strncmp
(
e
->
getName
(),
BUILDDIR
"/"
,
strlen
(
BUILDDIR
"/"
))
==
0
)
else
if
(
strcmp
(
SRCDIR
,
BUILDDIR
)
!=
0
&&
name
.
startswith
(
BUILDDIR
"/"
)
)
pathWarning
=
"modified source in build dir : %0"
;
else
if
(
strncmp
(
e
->
getName
(),
SRCDIR
"/"
,
strlen
(
SRCDIR
"/"
))
==
0
)
else
if
(
name
.
startswith
(
SRCDIR
"/"
)
)
;
// ok
else
{
...
...
@@ -213,7 +213,7 @@ void PluginHandler::HandleTranslationUnit( ASTContext& context )
bSkip
=
true
;
}
if
(
modifyFile
.
empty
())
modifyFile
=
e
->
getName
()
;
modifyFile
=
name
;
// Check whether the modified file is in the wanted scope
if
(
scope
==
"mainfile"
)
{
...
...
@@ -229,7 +229,7 @@ void PluginHandler::HandleTranslationUnit( ASTContext& context )
}
// Warn only now, so that files not in scope do not cause warnings.
if
(
pathWarning
!=
NULL
)
report
(
DiagnosticsEngine
::
Warning
,
pathWarning
)
<<
e
->
getName
()
;
report
(
DiagnosticsEngine
::
Warning
,
pathWarning
)
<<
name
;
if
(
bSkip
)
continue
;
char
*
filename
=
new
char
[
modifyFile
.
length
()
+
100
];
...
...
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