Bug 1434326: Cleanup DiagnosticsMatcher constructor. r?mystor
Removing a bit of the ugly :)
MozReview-Commit-ID: ATf2b2oh1F1
--- a/build/clang-plugin/DiagnosticsMatcher.cpp
+++ b/build/clang-plugin/DiagnosticsMatcher.cpp
@@ -1,18 +1,13 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "DiagnosticsMatcher.h"
-DiagnosticsMatcher::DiagnosticsMatcher(CompilerInstance &CI)
- :
-#define CHECK(cls, name) cls##_(name),
-#include "Checks.inc"
-#undef CHECK
- AstMatcher() {
+DiagnosticsMatcher::DiagnosticsMatcher(CompilerInstance &CI) {
#define CHECK(cls, name) \
cls##_.registerMatchers(&AstMatcher); \
cls##_.registerPPCallbacks(CI);
#include "Checks.inc"
#undef CHECK
}
--- a/build/clang-plugin/DiagnosticsMatcher.h
+++ b/build/clang-plugin/DiagnosticsMatcher.h
@@ -9,15 +9,15 @@
class DiagnosticsMatcher {
public:
DiagnosticsMatcher(CompilerInstance &CI);
ASTConsumerPtr makeASTConsumer() { return AstMatcher.newASTConsumer(); }
private:
-#define CHECK(cls, name) cls cls##_;
+#define CHECK(cls, name) cls cls##_ { name };
#include "Checks.inc"
#undef CHECK
MatchFinder AstMatcher;
};
#endif