From: Saleem Abdulrasool Date: Mon, 1 May 2017 00:26:59 +0000 (+0000) Subject: utils: Silence -Wpedantic warning X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=088659bc7724ffb7ced7c3aa3478b65384e3b1e4;p=clang utils: Silence -Wpedantic warning llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp:1673:67: warning: default argument specified for lambda parameter [-Wpedantic] const Record *Constraint = nullptr) { ^~~~~~~ Found by gcc 5.4.0. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301783 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp index 9814456753..7efc9bccdc 100644 --- a/utils/TableGen/ClangAttrEmitter.cpp +++ b/utils/TableGen/ClangAttrEmitter.cpp @@ -1670,7 +1670,7 @@ PragmaClangAttributeSupport::PragmaClangAttributeSupport( Records.getAllDerivedDefinitions("AttrSubjectMatcherRule"); auto MapFromSubjectsToRules = [this](const Record *SubjectContainer, const Record *MetaSubject, - const Record *Constraint = nullptr) { + const Record *Constraint) { Rules.emplace_back(MetaSubject, Constraint); std::vector ApplicableSubjects = SubjectContainer->getValueAsListOfDefs("Subjects"); @@ -1688,7 +1688,7 @@ PragmaClangAttributeSupport::PragmaClangAttributeSupport( } }; for (const auto *MetaSubject : MetaSubjects) { - MapFromSubjectsToRules(MetaSubject, MetaSubject); + MapFromSubjectsToRules(MetaSubject, MetaSubject, /*Constraints=*/nullptr); std::vector Constraints = MetaSubject->getValueAsListOfDefs("Constraints"); for (const auto *Constraint : Constraints)