Author: Haojian Wu Date: 2022-05-30T09:04:47+02:00 New Revision: a5ddd4a23858044beb3c04ebc6b965760eb7c125
URL: https://github.com/llvm/llvm-project/commit/a5ddd4a23858044beb3c04ebc6b965760eb7c125 DIFF: https://github.com/llvm/llvm-project/commit/a5ddd4a23858044beb3c04ebc6b965760eb7c125.diff LOG: [pseudo] Remove an unnecessary nullable check diagnostic in the bnf grammar, NFC. This diagnostic has been handled in eliminateOptional. Added: Modified: clang-tools-extra/pseudo/lib/grammar/GrammarBNF.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/pseudo/lib/grammar/GrammarBNF.cpp b/clang-tools-extra/pseudo/lib/grammar/GrammarBNF.cpp index 7ca5bc1a90221..f581adb3932ef 100644 --- a/clang-tools-extra/pseudo/lib/grammar/GrammarBNF.cpp +++ b/clang-tools-extra/pseudo/lib/grammar/GrammarBNF.cpp @@ -270,10 +270,6 @@ class GrammarBuilder { if (T.Rules[RID] == T.Rules[RID + 1]) Diagnostics.push_back( llvm::formatv("Duplicate rule: `{0}`", G.dumpRule(RID))); - // Warning for nullable nonterminals - if (T.Rules[RID].Size == 0) - Diagnostics.push_back( - llvm::formatv("Rule `{0}` has a nullable RHS", G.dumpRule(RID))); } // symbol-id -> used counts std::vector<unsigned> UseCounts(T.Nonterminals.size(), 0); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits