Skip to content

Commit

Permalink
Example cpp file now has an example error
Browse files Browse the repository at this point in the history
To demonstrate the diagnostic information response.
  • Loading branch information
Valloric committed Jun 3, 2014
1 parent fc7abe8 commit a130f4d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions examples/example_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@ def CppSemanticCompletionResults( server ):
# TODO: document this better
server.LoadExtraConfFile( PATH_TO_EXTRA_CONF )

# NOTE: The server will return diagnostic information about an error in the
# some_cpp.cpp file that we placed there intentionally (as an example).
# Clang will recover from this error and still manage to parse the file
# though.
server.SendEventNotification( Event.FileReadyToParse,
test_filename = 'some_cpp.cpp',
filetype = 'cpp' )
Expand Down
2 changes: 1 addition & 1 deletion examples/samples/some_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

struct Foo {
int x;
int y;
int y // There's a missing semicolon here
char c;
};

Expand Down
2 changes: 0 additions & 2 deletions ycmd/tests/get_completions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,5 +420,3 @@ def GetCompletions_UltiSnipsCompleter_UnusedWhenOffWithOption_test():

eq_( [],
app.post_json( '/completions', completion_data ).json[ 'completions' ] )


0 comments on commit a130f4d

Please sign in to comment.