Bug 1434326: Cleanup DiagnosticsMatcher constructor. r=mystor
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 30 Jan 2018 17:40:00 +0100
changeset 401503 6639a46610c1f408fc5abebb91f490222dcdca1f
parent 401502 31a0af4e29bbf601613a99d85ac4426d0a3251e8
child 401504 4c42b9b8bd98c6f378f94a6fc896d4a58964ec67
push id33346
push useraiakab@mozilla.com
push dateTue, 30 Jan 2018 21:59:39 +0000
treeherdermozilla-central@5fc179e245d5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmystor
bugs1434326
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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