Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
98b9b5a9
Commit
98b9b5a9
authored
Apr 15, 2019
by
Vladimir Glavnyy
Committed by
Wouter van Oortmerssen
Apr 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add logging of warnings from the flatc compiler (#5289)
parent
d07a3d2f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
flatc.cpp
src/flatc.cpp
+3
-1
idl_parser.cpp
src/idl_parser.cpp
+3
-1
No files found.
src/flatc.cpp
View file @
98b9b5a9
...
...
@@ -30,8 +30,10 @@ void FlatCompiler::ParseFile(
include_directories
.
push_back
(
local_include_directory
.
c_str
());
include_directories
.
push_back
(
nullptr
);
if
(
!
parser
.
Parse
(
contents
.
c_str
(),
&
include_directories
[
0
],
filename
.
c_str
()))
filename
.
c_str
()))
{
Error
(
parser
.
error_
,
false
,
false
);
}
if
(
!
parser
.
error_
.
empty
())
{
Warn
(
parser
.
error_
,
false
);
}
include_directories
.
pop_back
();
include_directories
.
pop_back
();
}
...
...
src/idl_parser.cpp
View file @
98b9b5a9
...
...
@@ -99,8 +99,10 @@ void DeserializeDoc( std::vector<std::string> &doc,
}
void
Parser
::
Message
(
const
std
::
string
&
msg
)
{
error_
=
file_being_parsed_
.
length
()
?
AbsolutePath
(
file_being_parsed_
)
:
""
;
if
(
!
error_
.
empty
())
error_
+=
"
\n
"
;
// log all warnings and errors
error_
+=
file_being_parsed_
.
length
()
?
AbsolutePath
(
file_being_parsed_
)
:
""
;
// clang-format off
#ifdef _WIN32 // MSVC alike
error_
+=
"("
+
NumToString
(
line_
)
+
", "
+
NumToString
(
CursorPosition
())
+
")"
;
...
...
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