mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1180549 - Fix a startup crash when using the clang-plugin with clang>3.5; r=mystor
We were de-referencing the checker variable after having moved it into the array, which was causing a null pointer crash. With this fixed, the plugin can be built with more recent versions of clang.
This commit is contained in:
parent
2eec7a5758
commit
68bc2d67de
@ -992,12 +992,13 @@ class MozCheckAction : public PluginASTAction {
|
||||
public:
|
||||
ASTConsumerPtr CreateASTConsumer(CompilerInstance &CI, StringRef fileName) override {
|
||||
#if CLANG_VERSION_FULL >= 306
|
||||
std::unique_ptr<MozChecker> checker(make_unique<MozChecker>(CI));
|
||||
std::unique_ptr<MozChecker> checker(llvm::make_unique<MozChecker>(CI));
|
||||
ASTConsumerPtr other(checker->getOtherConsumer());
|
||||
|
||||
std::vector<std::unique_ptr<ASTConsumer>> consumers;
|
||||
std::vector<ASTConsumerPtr> consumers;
|
||||
consumers.push_back(std::move(checker));
|
||||
consumers.push_back(checker->getOtherConsumer());
|
||||
return make_unique<MultiplexConsumer>(std::move(consumers));
|
||||
consumers.push_back(std::move(other));
|
||||
return llvm::make_unique<MultiplexConsumer>(std::move(consumers));
|
||||
#else
|
||||
MozChecker *checker = new MozChecker(CI);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user