Lines Matching defs:Main

380   Annotations Main(R"cpp(
387 TestTU TU = TestTU::withCode(Main.code());
392 Diag(Main.range(), "in template: base specifier must name a class"),
394 Diag(Main.range(), "in instantiation of template class "
401 Annotations Main(R"cpp(
405 TestTU TU = TestTU::withCode(Main.code());
418 Diag(Main.range(),
467 Annotations Main(R"cpp(
472 TestTU TU = TestTU::withCode(Main.code());
476 EXPECT_THAT(TU.build().getDiagnostics(), ElementsAre(hasRange(Main.range())));
482 Annotations Main(R"cpp(
486 TestTU TU = TestTU::withCode(Main.code());
500 Diag(Main.range(),
506 Annotations Main(R"cpp(
523 TestTU TU = TestTU::withCode(Main.code());
528 Diag(Main.range(), "use range-based for loop instead"),
533 Annotations Main(R"cpp(
540 auto TU = TestTU::withCode(Main.code());
543 ElementsAre(Diag(Main.range(), "use of undeclared identifier 'unknown'"),
544 Diag(Main.range("ret"),
550 ElementsAre(Diag(Main.range(),
558 Annotations Main(R"cpp(
561 auto TU = TestTU::withCode(Main.code());
570 Annotations Main(R"cpp(
590 TestTU TU = TestTU::withCode(Main.code());
595 Diag(Main.range(), "result of integer division used in a floating "
602 Annotations Main(R"cpp(
611 auto TU = TestTU::withCode(Main.code());
628 UnorderedElementsAre(Diag(Main.range("inline"), BadDivision),
629 Diag(Main.range("user"), BadDivision))));
633 Annotations Main(R"cpp(
639 TestTU TU = TestTU::withCode(Main.code());
645 Diag(Main.range(), "result of integer division used in a floating "
665 Annotations Main(R"cpp( // error-ok
668 TestTU TU = TestTU::withCode(Main.code());
671 AllOf(Diag(Main.range(), "unused function 'foo'"),
799 Annotations Main(R"cpp(
805 TestTU TU = TestTU::withCode(Main.code());
812 Annotations Main(R"cpp(
821 TestTU TU = TestTU::withCode(Main.code());
827 Annotations Main(R"cpp(
837 TestTU TU = TestTU::withCode(Main.code());
841 Diag(Main.range(), "do not use 'else' after 'return'"))));
845 Annotations Main(R"cpp($MathHeader[[]]
858 TestTU TU = TestTU::withCode(Main.code());
865 ExpectedAFix.Edits.push_back(TextEdit{Main.range("Fix"), " : A(1)"});
866 ExpectedAFix.Edits.push_back(TextEdit{Main.range("A"), ""});
874 ExpectedBFix.Edits.push_back(TextEdit{Main.range("Fix"), " : B(1)"});
875 ExpectedBFix.Edits.push_back(TextEdit{Main.range("B"), ""});
879 ExpectedCFix.Edits.push_back(TextEdit{Main.range("CFix"), " = NAN"});
881 TextEdit{Main.range("MathHeader"), "#include <math.h>\n\n"});
887 ExpectedDFix.Edits.push_back(TextEdit{Main.range("DFix"), " = NAN"});
889 TextEdit{Main.range("MathHeader"), "#include <math.h>\n\n"});
893 AllOf(Diag(Main.range("A"), "'A' should be initialized in a member "
896 AllOf(Diag(Main.range("B"), "'B' should be initialized in a member "
899 AllOf(Diag(Main.range("C"), "variable 'C' is not initialized"),
901 AllOf(Diag(Main.range("D"), "variable 'D' is not initialized"),
906 Annotations Main(R"cpp(
918 TestTU TU = TestTU::withCode(Main.code());
924 {TextEdit{Main.range("override1"), " override"},
925 TextEdit{Main.range("virtual1"), ""}},
930 {TextEdit{Main.range("override2"), " override"},
931 TextEdit{Main.range("virtual2"), ""}},
937 AllOf(Diag(Main.range("Reset1"),
941 AllOf(Diag(Main.range("Reset2"),
948 std::string Main = R"cpp(
957 auto TU = TestTU::withCode(Main);
1298 Annotations Main(Case.second);
1299 TU.Code = Main.code().str() + "\n // error-ok";
1302 ElementsAre(AllOf(diagName(Case.first), hasRange(Main.range()),
1330 Annotations Main(Case.second);
1331 TU.Code = Main.code().str() + "\n // error-ok";
1333 Contains(AllOf(diagName(Case.first), hasRange(Main.range()),
1713 Annotations Main(R"cpp(
1717 TestTU TU = TestTU::withCode(Main.code());
1721 Diag(Main.range(), "in included file: a type specifier is "
1727 Annotations Main(R"cpp(
1730 TestTU TU = TestTU::withCode(Main.code());
1734 UnorderedElementsAre(Diag(Main.range(),
1740 Annotations Main(R"cpp(
1744 TestTU TU = TestTU::withCode(Main.code());
1749 Diag(Main.range("a"), "in included file: a type specifier is "
1751 Diag(Main.range("b"), "in included file: a type specifier is "
1756 Annotations Main(R"cpp(
1760 TestTU TU = TestTU::withCode(Main.code());
1765 Contains(Diag(Main.range(), "in included file: a type specifier "
1770 Annotations Main(R"cpp(
1776 TestTU TU = TestTU::withCode(Main.code());
1782 UnorderedElementsAre(Diag(Main.range(),
1788 Annotations Main(R"cpp(
1792 TestTU TU = TestTU::withCode(Main.code());
1811 UnorderedElementsAre(Diag(Main.range(),
1817 Annotations Main(R"cpp(
1823 TestTU TU = TestTU::withCode(Main.code());
1827 Diag(Main.range(), "in included file: a type specifier is "
1833 Annotations Main(R"cpp(
1839 TestTU TU = TestTU::withCode(Main.code());
1847 Annotations Main(R"cpp(
1853 TestTU TU = TestTU::withCode(Main.code());
1858 Diag(Main.range(),
1864 Annotations Main(R"cpp(
1872 TestTU TU = TestTU::withCode(Main.code());
1876 Diag(Main.range(), "in included file: use of undeclared "
1881 Annotations Main(R"cpp(
1889 TestTU TU = TestTU::withCode(Main.code());
1893 Diag(Main.range(), "in included file: use of undeclared "