]> granicus.if.org Git - clang/commitdiff
utils: Silence -Wpedantic warning
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 1 May 2017 00:26:59 +0000 (00:26 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 1 May 2017 00:26:59 +0000 (00:26 +0000)
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

utils/TableGen/ClangAttrEmitter.cpp

index 98144567534350129c6392594ca0fbcb9d6539b7..7efc9bccdc5c7030815c236bfa2f38dde17f10b3 100644 (file)
@@ -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<Record *> 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<Record *> Constraints =
         MetaSubject->getValueAsListOfDefs("Constraints");
     for (const auto *Constraint : Constraints)