Use inline initialisers to set default field values

A trivial cleanup that helps in a moment..


[ROCm/hip commit: 24fc459f69]
This commit is contained in:
Chris Kitching
2017-10-15 11:09:17 +01:00
parent 2584387bfc
commit c08f105982
+5 -5
View File
@@ -3028,7 +3028,7 @@ class Cuda2HipCallback;
class HipifyPPCallbacks : public PPCallbacks, public SourceFileCallbacks, public Cuda2Hip {
public:
HipifyPPCallbacks(Replacements *R, const std::string &mainFileName)
: Cuda2Hip(R, mainFileName), SeenEnd(false), _sm(nullptr), _pp(nullptr) {}
: Cuda2Hip(R, mainFileName) {}
virtual bool handleBeginSource(CompilerInstance &CI
#if LLVM_VERSION_MAJOR < 4
@@ -3201,15 +3201,15 @@ public:
void EndOfMainFile() override {}
bool SeenEnd;
bool SeenEnd = false;
void setSourceManager(SourceManager *sm) { _sm = sm; }
void setPreprocessor(Preprocessor *pp) { _pp = pp; }
void setMatch(Cuda2HipCallback *match) { Match = match; }
private:
SourceManager *_sm;
Preprocessor *_pp;
Cuda2HipCallback *Match;
SourceManager *_sm = nullptr;
Preprocessor *_pp = nullptr;
Cuda2HipCallback *Match = nullptr;
};
class Cuda2HipCallback : public MatchFinder::MatchCallback, public Cuda2Hip {