Skip to content

Commit

Permalink
Fix issue Andersbakken#351. Make sure we serialize the actual flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andersbakken committed May 20, 2015
1 parent 3f8e2c2 commit 03ffbcb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/ClangIndexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "Diagnostic.h"
#include "RClient.h"
#include <unistd.h>
#include "Server.h"

static const CXSourceLocation nullLocation = clang_getNullLocation();
static const CXCursor nullCursor = clang_getNullCursor();
Expand All @@ -43,7 +42,7 @@ struct VerboseVisitorUserData {
ClangIndexer *indexer;
};

uint32_t ClangIndexer::sServerOpts = 0;
Flags<Server::Option> ClangIndexer::sServerOpts;
ClangIndexer::ClangIndexer()
: mClangUnit(0), mIndex(0), mLastCursor(nullCursor), mVisitFileResponseMessageFileId(0),
mVisitFileResponseMessageVisit(0), mParseDuration(0), mVisitDuration(0),
Expand Down
3 changes: 2 additions & 1 deletion src/ClangIndexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "IndexerJob.h"
#include "RTagsClang.h"
#include "Symbol.h"
#include "Server.h"

struct Unit;
class ClangIndexer
Expand Down Expand Up @@ -173,7 +174,7 @@ class ClangIndexer
bool mLastBlocked;
Path mLastFile;

static uint32_t sServerOpts;
static Flags<Server::Option> sServerOpts;
};

#endif
4 changes: 3 additions & 1 deletion src/FindSymbolsJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ along with RTags. If not, see <http://www.gnu.org/licenses/>. */

static inline Flags<QueryJob::JobFlag> jobFlags(Flags<QueryMessage::Flag> queryFlags)
{
return (queryFlags & QueryMessage::ElispList) ? QueryJob::QuoteOutput|QueryJob::QuietJob : QueryJob::QuietJob;
return (queryFlags & QueryMessage::ElispList
? QueryJob::QuoteOutput|QueryJob::QuietJob
: Flags<QueryJob::JobFlag>(QueryJob::QuietJob));
}

FindSymbolsJob::FindSymbolsJob(const std::shared_ptr<QueryMessage> &query, const std::shared_ptr<Project> &proj)
Expand Down
2 changes: 1 addition & 1 deletion src/IndexerJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ String IndexerJob::encode() const
<< static_cast<uint32_t>(options.rpConnectTimeout)
<< static_cast<uint32_t>(options.rpConnectAttempts)
<< static_cast<int32_t>(options.rpNiceValue)
<< static_cast<uint32_t>(options.options)
<< options.options
<< unsavedFiles
<< options.dataDir;
assert(proj);
Expand Down

0 comments on commit 03ffbcb

Please sign in to comment.