Bug 1434326: Cleanup DiagnosticsMatcher constructor. r=mystor
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 30 Jan 2018 17:40:00 +0100
changeset 749079 6639a46610c1f408fc5abebb91f490222dcdca1f
parent 749078 31a0af4e29bbf601613a99d85ac4426d0a3251e8
child 749080 4c42b9b8bd98c6f378f94a6fc896d4a58964ec67
push id97316
push userbmo:continuation@gmail.com
push dateTue, 30 Jan 2018 22:53:01 +0000
reviewersmystor
bugs1434326
milestone60.0a1
Bug 1434326: Cleanup DiagnosticsMatcher constructor. r=mystor Removing a bit of the ugly :) MozReview-Commit-ID: ATf2b2oh1F1
build/clang-plugin/DiagnosticsMatcher.cpp
build/clang-plugin/DiagnosticsMatcher.h
--- 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