10#include "gmock/gmock.h"
11#include "gtest/gtest.h"
13using ::testing::AllOf;
14using ::testing::HasSubstr;
16using ::testing::StartsWith;
24TEST_F(ExtractFunctionTest, FunctionTest) {
28 EXPECT_EQ(apply(
"for(;;) [[1+2; 1+2;]]"),
"unavailable");
30 EXPECT_THAT(apply(
"int x = 0; [[x++;]]"), HasSubstr(
"extracted"));
32 EXPECT_EQ(apply(
"auto lam = [](){ [[int x;]] }; "),
"unavailable");
34 EXPECT_THAT(apply(
"int [[x = 0]];"),
"unavailable");
36 EXPECT_THAT(apply(
" [[int a = 5;]] a++; "),
"unavailable");
40 EXPECT_THAT(apply(
"for(;;) { [[int x;]]break; }"), HasSubstr(
"extracted"));
44 EXPECT_THAT(apply(
" for([[int i = 0;]];);"), HasSubstr(
"extracted"));
50 EXPECT_EQ(apply(
"void use(int); for([[int i = 0;]] i < 10; ++i) use(i);"),
53 EXPECT_THAT(apply(
" if(true) [[{ return; }]] "), HasSubstr(
"extracted"));
55 EXPECT_THAT(apply(
" if(true) [[if (false) return;]] "),
56 StartsWith(
"unavailable"));
58 apply(
"#define RETURN_IF_ERROR(x) if (x) return\nRETU^RN_IF_ERROR(4);"),
59 StartsWith(
"unavailable"));
62TEST_F(ExtractFunctionTest, FileTest) {
67 std::string ParameterCheckInput = R
"cpp(
78 std::string ParameterCheckOutput = R"cpp(
82void extracted(int &a, int b, int * &ptr, const Foo &foo) {
90 extracted(a, b, ptr, foo);
92 EXPECT_EQ(apply(ParameterCheckInput), ParameterCheckOutput);
95 std::string ConstCheckInput = R
"cpp(
99 std::string ConstCheckOutput = R"cpp(
100void extracted(const int c) {
106 EXPECT_EQ(apply(ConstCheckInput), ConstCheckOutput);
109 std::string ConstNamespaceCheckInput = R
"cpp(
110namespace X { struct Y { int z; }; }
111int f(const X::Y &y) {
112 [[return y.z + y.z;]]
114 std::string ConstNamespaceCheckOutput = R"cpp(
115namespace X { struct Y { int z; }; }
116int extracted(const X::Y &y) {
119int f(const X::Y &y) {
122 EXPECT_EQ(apply(ConstNamespaceCheckInput), ConstNamespaceCheckOutput);
125 EXPECT_THAT(apply(
"void f() { [[int a; f();]] }"), StartsWith(
"fail"));
127 std::string MethodInput = R
"cpp(
134 std::string MethodCheckOutput = R"cpp(
144 EXPECT_EQ(apply(MethodInput), MethodCheckOutput);
146 std::string OutOfLineMethodInput = R"cpp(
155 std::string OutOfLineMethodCheckOutput = R"cpp(
161 void T::extracted() {
168 EXPECT_EQ(apply(OutOfLineMethodInput), OutOfLineMethodCheckOutput);
172 std::string TemplateFailInput = R
"cpp(
178 EXPECT_EQ(apply(TemplateFailInput), "unavailable");
180 std::string MacroInput = R
"cpp(
181 #define F(BODY) void f() { BODY }
184 std::string MacroOutput = R"cpp(
185 #define F(BODY) void f() { BODY }
191 EXPECT_EQ(apply(MacroInput), MacroOutput);
194 EXPECT_EQ(apply(
"void f([[int a]]);"),
"unavailable");
195 EXPECT_EQ(apply(
"void f(int a = [[1]]);"),
"unavailable");
197 std::string CompoundFailInput = R
"cpp(
202 EXPECT_EQ(apply(CompoundFailInput), "unavailable");
204 ExtraArgs.push_back(
"-std=c++14");
207 EXPECT_THAT(apply(R
"cpp(
208 void call() { [[1+1]]; }
210 HasSubstr("extracted"));
211 EXPECT_THAT(apply(R
"cpp(
212 void call() { [[1+1;]] }
214 HasSubstr("extracted"));
217TEST_F(ExtractFunctionTest, DifferentHeaderSourceTest) {
224 std::string OutOfLineSource = R"cpp(
225 void SomeClass::f() {
230 std::string OutOfLineSourceOutputCheck = R"cpp(
231 void SomeClass::extracted() {
239 std::string HeaderOutputCheck = R"cpp(
246 llvm::StringMap<std::string> EditedFiles;
248 EXPECT_EQ(apply(OutOfLineSource, &EditedFiles), OutOfLineSourceOutputCheck);
249 EXPECT_EQ(EditedFiles.begin()->second, HeaderOutputCheck);
252TEST_F(ExtractFunctionTest, DifferentFilesNestedTest) {
261 std::string NestedOutOfLineSource = R"cpp(
262 void T::SomeClass::f() {
267 std::string NestedOutOfLineSourceOutputCheck = R"cpp(
268 void T::SomeClass::extracted() {
271void T::SomeClass::f() {
276 std::string NestedHeaderOutputCheck = R"cpp(
285 llvm::StringMap<std::string> EditedFiles;
287 EXPECT_EQ(apply(NestedOutOfLineSource, &EditedFiles),
288 NestedOutOfLineSourceOutputCheck);
289 EXPECT_EQ(EditedFiles.begin()->second, NestedHeaderOutputCheck);
292TEST_F(ExtractFunctionTest, ConstexprDifferentHeaderSourceTest) {
295 constexpr void f() const;
299 std::string OutOfLineSource = R"cpp(
300 constexpr void SomeClass::f() const {
305 std::string OutOfLineSourceOutputCheck = R"cpp(
306 constexpr void SomeClass::extracted() const {
309constexpr void SomeClass::f() const {
314 std::string HeaderOutputCheck = R"cpp(
316 constexpr void extracted() const;
317constexpr void f() const;
321 llvm::StringMap<std::string> EditedFiles;
323 EXPECT_EQ(apply(OutOfLineSource, &EditedFiles), OutOfLineSourceOutputCheck);
324 EXPECT_NE(EditedFiles.begin(), EditedFiles.end())
325 << "The header should be edited and receives the declaration of the new "
328 if (EditedFiles.begin() != EditedFiles.end()) {
329 EXPECT_EQ(EditedFiles.begin()->second, HeaderOutputCheck);
333TEST_F(ExtractFunctionTest, ConstevalDifferentHeaderSourceTest) {
334 ExtraArgs.push_back(
"--std=c++20");
337 consteval void f() const;
341 std::string OutOfLineSource = R"cpp(
342 consteval void SomeClass::f() const {
347 std::string OutOfLineSourceOutputCheck = R"cpp(
348 consteval void SomeClass::extracted() const {
351consteval void SomeClass::f() const {
356 std::string HeaderOutputCheck = R"cpp(
358 consteval void extracted() const;
359consteval void f() const;
363 llvm::StringMap<std::string> EditedFiles;
365 EXPECT_EQ(apply(OutOfLineSource, &EditedFiles), OutOfLineSourceOutputCheck);
366 EXPECT_NE(EditedFiles.begin(), EditedFiles.end())
367 << "The header should be edited and receives the declaration of the new "
370 if (EditedFiles.begin() != EditedFiles.end()) {
371 EXPECT_EQ(EditedFiles.begin()->second, HeaderOutputCheck);
375TEST_F(ExtractFunctionTest, ConstDifferentHeaderSourceTest) {
382 std::string OutOfLineSource = R"cpp(
383 void SomeClass::f() const {
388 std::string OutOfLineSourceOutputCheck = R"cpp(
389 void SomeClass::extracted() const {
392void SomeClass::f() const {
397 std::string HeaderOutputCheck = R"cpp(
399 void extracted() const;
404 llvm::StringMap<std::string> EditedFiles;
406 EXPECT_EQ(apply(OutOfLineSource, &EditedFiles), OutOfLineSourceOutputCheck);
407 EXPECT_NE(EditedFiles.begin(), EditedFiles.end())
408 << "The header should be edited and receives the declaration of the new "
411 if (EditedFiles.begin() != EditedFiles.end()) {
412 EXPECT_EQ(EditedFiles.begin()->second, HeaderOutputCheck);
416TEST_F(ExtractFunctionTest, StaticDifferentHeaderSourceTest) {
423 std::string OutOfLineSource = R"cpp(
424 void SomeClass::f() {
429 std::string OutOfLineSourceOutputCheck = R"cpp(
430 void SomeClass::extracted() {
438 std::string HeaderOutputCheck = R"cpp(
440 static void extracted();
445 llvm::StringMap<std::string> EditedFiles;
447 EXPECT_EQ(apply(OutOfLineSource, &EditedFiles), OutOfLineSourceOutputCheck);
448 EXPECT_NE(EditedFiles.begin(), EditedFiles.end())
449 << "The header should be edited and receives the declaration of the new "
452 if (EditedFiles.begin() != EditedFiles.end()) {
453 EXPECT_EQ(EditedFiles.begin()->second, HeaderOutputCheck);
457TEST_F(ExtractFunctionTest, DifferentContextHeaderSourceTest) {
475 std::string OutOfLineSource = R"cpp(
476 ns::A::C::RType ns::A::T::SomeClass::f() {
482 std::string OutOfLineSourceOutputCheck = R"cpp(
483 ns::A::C::RType ns::A::T::SomeClass::extracted() {
487ns::A::C::RType ns::A::T::SomeClass::f() {
492 std::string HeaderOutputCheck = R"cpp(
502 static ns::A::C::RType extracted();
510 llvm::StringMap<std::string> EditedFiles;
512 EXPECT_EQ(apply(OutOfLineSource, &EditedFiles), OutOfLineSourceOutputCheck);
513 EXPECT_EQ(EditedFiles.begin()->second, HeaderOutputCheck);
516TEST_F(ExtractFunctionTest, DifferentSyntacticContextNamespace) {
517 std::string OutOfLineSource = R"cpp(
527 std::string OutOfLineSourceOutputCheck = R"cpp(
533 void ns::extracted() {
541 EXPECT_EQ(apply(OutOfLineSource), OutOfLineSourceOutputCheck);
544TEST_F(ExtractFunctionTest, ControlFlow) {
547 EXPECT_THAT(apply(
" [[for(;;) if(1) break;]] "), HasSubstr(
"extracted"));
548 EXPECT_THAT(apply(
" for(;;) [[while(1) break;]] "), HasSubstr(
"extracted"));
549 EXPECT_THAT(apply(
" [[switch(1) { break; }]]"), HasSubstr(
"extracted"));
550 EXPECT_THAT(apply(
" [[while(1) switch(1) { continue; }]]"),
551 HasSubstr(
"extracted"));
553 EXPECT_THAT(apply(
" for(;;) [[if(1) continue;]] "), StartsWith(
"fail"));
554 EXPECT_THAT(apply(
" while(1) [[if(1) break;]] "), StartsWith(
"fail"));
555 EXPECT_THAT(apply(
" switch(1) { [[break;]] }"), StartsWith(
"fail"));
556 EXPECT_THAT(apply(
" for(;;) { [[while(1) break; break;]] }"),
560TEST_F(ExtractFunctionTest, ExistingReturnStatement) {
562 const char *Before = R
"cpp(
564 int getNum(bool Superstitious, int Min, int Max) {
565 if (Superstitious) [[{
566 for (int I = Min; I <= Max; ++I)
571 return (Min + Max) / 2;
576 const char *After = R
"cpp(
578 int extracted(int Min, int Max) {
580 for (int I = Min; I <= Max; ++I)
586int getNum(bool Superstitious, int Min, int Max) {
587 if (Superstitious) return extracted(Min, Max); else {
588 return (Min + Max) / 2;
592 EXPECT_EQ(apply(Before), After);
595TEST_F(ExtractFunctionTest, OverloadedOperators) {
597 std::string Before = R"cpp(struct A {
598 int operator+(int x) { return x; }
600 A &operator<<(A &, int);
601 A &operator|(A &, int);
618 int operator+(int x) { return x; }
620 A &operator<<(A &, int);
621 A &operator|(A &, int);
639 EXPECT_EQ(apply(Before), After);
642TEST_F(ExtractFunctionTest, SingleStatement) {
646 EXPECT_THAT(apply(R
"cpp(
651 HasSubstr("extracted"));
657 EXPECT_THAT(apply(R
"cpp(
659 Stream &operator<<(Stream &, const char *);
664 HasSubstr("extracted"));
668 EXPECT_EQ(apply(R
"cpp(
670 Stream &operator<<(Stream &, int);
679 EXPECT_EQ(apply(R
"cpp(
681 Stream &operator<<(Stream &, int);
682 void foo(Stream &, int);
685 foo([[stream << 3]], 4);
690TEST_F(ExtractFunctionTest, ControlFlowConditions) {
694 EXPECT_EQ(apply(R
"cpp(
695 int example(int event1, bool event2, double event3) {
696 if ([[event1 == 2 && event2 && event3 == 10.3]])
702 EXPECT_EQ(apply(
"void f(int x) { while ([[x > 0]]) --x; }"),
"unavailable");
703 EXPECT_EQ(apply(
"void f(int x) { do {} while ([[x > 0]]); }"),
"unavailable");
704 EXPECT_EQ(apply(
"void f(int x) { for (; [[x > 0]];) ; }"),
"unavailable");
705 EXPECT_EQ(apply(
"void f(int x) { switch ([[x + 1]]) {} }"),
"unavailable");
708 EXPECT_EQ(apply(
"bool cond(); void f() { if ([[bool b = cond()]]) ; }"),
715 EXPECT_THAT(apply(
"void f(int x) { for ([[x = 0]]; x < 10; ++x) ; }"),
716 HasSubstr(
"extracted"));
717 EXPECT_THAT(apply(
"void f(int x) { for (;; [[--x]]) ; }"),
718 HasSubstr(
"extracted"));
720 ExtraArgs.push_back(
"-std=c++17");
721 EXPECT_THAT(apply(
"void f(int x) { if ([[x = 0]]; x > 0) ; }"),
722 HasSubstr(
"extracted"));
723 EXPECT_THAT(apply(
"void f(int x) { switch ([[x = 0]]; x) {} }"),
724 HasSubstr(
"extracted"));
727 EXPECT_THAT(apply(
"void f(int x) { if (x > 0) [[x = x * 2;]] }"),
728 HasSubstr(
"extracted"));
731TEST_F(ExtractFunctionTest, RangeBasedFor) {
736 EXPECT_EQ(apply(R
"cpp(
737 struct Vec { int *begin(); int *end(); };
739 void f() { for (auto X : [[V]]) {} }
743 EXPECT_THAT(apply(R
"cpp(
744 struct Vec { int *begin(); int *end(); };
747 void f() { for (auto X : V) { [[foo(X);]] } }
749 HasSubstr("extracted"));
752TEST_F(ExtractFunctionTest, VarDeclInitializer) {
760 EXPECT_EQ(apply(R
"cpp(
762 void f() { auto A = [[func()]]; }
767 EXPECT_EQ(apply(R
"cpp(
769 void f() { int A = [[func()]]; }
774 EXPECT_THAT(apply(R
"cpp(
776 void f() { [[int A = func();]] }
778 HasSubstr("extracted"));
781TEST_F(ExtractFunctionTest, ConstParameters) {
786 EXPECT_THAT(apply(R
"cpp(
788 void f(int x) { [[use(x);]] }
790 HasSubstr("void extracted(int x)"));
792 EXPECT_THAT(apply(
"void f(int x) { [[x = 1;]] }"),
793 HasSubstr(
"void extracted(int &x)"));
795 EXPECT_THAT(apply(
"void f(int x) { [[x += 1;]] }"),
796 HasSubstr(
"void extracted(int &x)"));
798 EXPECT_THAT(apply(
"void f(int x) { [[++x;]] }"),
799 HasSubstr(
"void extracted(int &x)"));
801 EXPECT_THAT(apply(R
"cpp(
802 struct S { void mutate(); };
803 void f(S s) { [[s.mutate();]] }
805 HasSubstr("void extracted(S &s)"));
807 EXPECT_THAT(apply(R
"cpp(
808 struct S { void inspect() const; };
809 void f(S s) { [[s.inspect();]] }
811 HasSubstr("void extracted(const S &s)"));
814 EXPECT_THAT(apply(R
"cpp(
815 void mayMutate(int &);
816 void f(int x) { [[mayMutate(x);]] }
818 HasSubstr("void extracted(int &x)"));
821 EXPECT_THAT(apply(R
"cpp(
822 void readOnly(const int &);
823 void f(int x) { [[readOnly(x);]] }
825 HasSubstr("void extracted(int x)"));
826 EXPECT_THAT(apply(R
"cpp(
828 void f(int x) { [[byValue(x);]] }
830 HasSubstr("void extracted(int x)"));
834 EXPECT_THAT(apply(
"void use(int); void f(const int x) { [[use(x);]] }"),
835 HasSubstr(
"void extracted(const int x)"));
838 EXPECT_THAT(apply(R
"cpp(
841 void f(const S s) { [[use(s);]] }
843 HasSubstr("void extracted(const S &s)"));
846TEST_F(ExtractFunctionTest, ConstParametersReferenceAliasing) {
854 EXPECT_THAT(apply(R
"cpp(
860 HasSubstr("void extracted(int &x)"));
863TEST_F(ExtractFunctionTest, ConstParametersConservativeAliasing) {
867 EXPECT_THAT(apply(
"void f(int x) { [[int *p = &x;]] }"),
868 HasSubstr(
"void extracted(int &x)"));
870 EXPECT_THAT(apply(
"void f(int x) { [[static_cast<int &>(x) = 1;]] }"),
871 HasSubstr(
"void extracted(int &x)"));
874 EXPECT_THAT(apply(
"void f(int x) { [[auto l = [&x]() { int y = x; };]] }"),
875 HasSubstr(
"int &x"));
878 EXPECT_THAT(apply(
"void f(int x) { [[auto l = [x]() { int y = x; };]] }"),
879 HasSubstr(
"void extracted(int x)"));
884 EXPECT_THAT(apply(
"int f(int x) { [[return x;]] }"), HasSubstr(
"&x"));
886 EXPECT_THAT(apply(
"void f() { int arr[5]; [[arr[0] = 1;]] }"),
887 Not(HasSubstr(
"const")));
890TEST_F(ExtractFunctionTest, ConstParametersMemberCallArguments) {
896 EXPECT_THAT(apply(R
"cpp(
897 struct S { void mayMutate(int &) const; };
898 void f(S s, int x) { [[s.mayMutate(x);]] }
900 HasSubstr("extracted(const S &s, int &x)"));
904 EXPECT_THAT(apply(R
"cpp(
905 struct S { void operator()(int &) const; };
906 void f(S s, int x) { [[s(x);]] }
908 HasSubstr("extracted(const S &s, int &x)"));
911 EXPECT_THAT(apply(R
"cpp(
913 void operator+(const S &, int &);
914 void f(S s, int x) { [[s + x;]] }
916 HasSubstr("extracted(const S &s, int &x)"));
919TEST_F(ExtractFunctionTest, ConstParametersPointerIndirection) {
926 EXPECT_THAT(apply(R
"cpp(
928 void f(S *ptr) { [[ptr->x = 1;]] }
930 HasSubstr("extracted(S * ptr)"));
931 EXPECT_THAT(apply(
"void f(int *p) { [[p[0] = 1;]] }"),
932 HasSubstr(
"extracted(int * p)"));
934 EXPECT_THAT(apply(
"void f(int *p) { [[*p = 1;]] }"),
935 HasSubstr(
"extracted(int * p)"));
938TEST_F(ExtractFunctionTest, ConstParametersConditionalReferenceBinding) {
944 EXPECT_THAT(apply(R
"cpp(
945 void f(bool cond, int c, int d) {
946 [[int &a = cond ? c : d;
950 HasSubstr("extracted(bool cond, int &c, int &d)"));
953TEST_F(ExtractFunctionTest, ConstParametersConditionalMutatingAccess) {
956 EXPECT_THAT(apply(R
"cpp(
958 void f(bool cond, S s1, S s2) {
959 [[(cond ? s1 : s2).n = 0;]]
962 HasSubstr("extracted(bool cond, S &s1, S &s2)"));
965TEST_F(ExtractFunctionTest, ConstParametersStaticOperatorCall) {
970 ExtraArgs.push_back(
"-std=c++23");
971 EXPECT_THAT(apply(R
"cpp(
972 struct S { static void operator()(int); };
973 void f(S s, int x) { [[s(x);]] }
975 HasSubstr("extracted(const S &s, int x)"));
978TEST_F(ExtractFunctionTest, ConstParametersScalarsByValue) {
981 EXPECT_THAT(apply(
"void use(int *); void f(int *p) { [[use(p);]] }"),
982 HasSubstr(
"extracted(int * p)"));
984 EXPECT_THAT(apply(R
"cpp(
987 void f(E e) { [[use(e);]] }
989 HasSubstr("extracted(E e)"));
992 EXPECT_THAT(apply(R
"cpp(
993 struct Point { int x, y; };
995 void f(Point p) { [[use(p);]] }
997 HasSubstr("extracted(const Point &p)"));
1000 EXPECT_THAT(apply(
"void f() { int arr[5]; [[int x = arr[0];]] }"),
1001 HasSubstr(
"extracted(int[5] &arr)"));
1006TEST_F(ExtractFunctionTest, ReferenceToScalar) {
1008 EXPECT_THAT(apply(R
"cpp(
1018 HasSubstr("extracted(int &A, const int &B)"));
1019 EXPECT_THAT(apply(R
"cpp(
1029 HasSubstr("extracted(int &A, const int &B)"));
1032TEST_F(ExtractFunctionTest, VolatileScalar) {
1034 EXPECT_THAT(apply(R
"cpp(
1035 void bar(const volatile int &, int) {}
1042 HasSubstr("extracted(const volatile int &V)"));
1045TEST_F(ExtractFunctionTest, CFileAllowUnmodifiedScalar) {
1048 EXPECT_THAT(apply(R
"cpp(
1054 HasSubstr("extracted(int j)"));
1057TEST_F(ExtractFunctionTest, CFileModifiedScalarBecomesPointer) {
1063 EXPECT_THAT(apply(R
"cpp(
1068 AllOf(HasSubstr("extracted(int * j)"), HasSubstr(
"(*j) = 0;"),
1069 HasSubstr(
"extracted(&j)")));
1072TEST_F(ExtractFunctionTest, CFileUnmodifiedStructBecomesConstPointer) {
1077 EXPECT_THAT(apply(R
"cpp(
1078 struct pair { int v1; int v2; };
1085 AllOf(HasSubstr("extracted(const struct pair * p)"),
1086 HasSubstr(
"i = p->v1;"), HasSubstr(
"extracted(&p)")));
1089TEST_F(ExtractFunctionTest, CFileStructMixedUses) {
1095 EXPECT_THAT(apply(R
"cpp(
1096 struct pair { int v1; int v2; };
1097 void use(struct pair);
1101 [[use(p); i = p.v1;]]
1103 AllOf(HasSubstr("use((*p));"), HasSubstr(
"i = p->v1;")));
1106TEST_F(ExtractFunctionTest, CFileRejectMacroDot) {
1113 EXPECT_EQ(apply(R
"cpp(
1115 struct pair { int v1; int v2; };
1120 "fail: Too complex to extract.");
1123TEST_F(ExtractFunctionTest, CFileModifiedArrayStaysPlainPointer) {
1132 EXPECT_THAT(apply(R
"cpp(
1137 AllOf(HasSubstr("extracted(int * arr)"), HasSubstr(
"arr[0] = 1;"),
1138 HasSubstr(
"extracted(arr)"), Not(HasSubstr(
"&arr"))));
1141TEST_F(ExtractFunctionTest, CFileStaticFunctionStaysStatic) {
1147 EXPECT_THAT(apply(R
"cpp(
1152 HasSubstr("static void extracted"));
1155TEST_F(ExtractFunctionTest, CFileStaticForwardDeclaredFunctionStaysStatic) {
1162 EXPECT_THAT(apply(R
"cpp(
1168 HasSubstr("static void extracted"));
1171TEST_F(ExtractFunctionTest, CFileRejectArraySizeof) {
1177 EXPECT_EQ(apply(R
"cpp(
1180 [[int n = sizeof(arr);]]
1182 "fail: Too complex to extract.");
1185TEST_F(ExtractFunctionTest, CFileRejectArrayAlignof) {
1191 EXPECT_EQ(apply(R
"cpp(
1194 [[int n = __alignof(arr);]]
1196 "fail: Too complex to extract.");
1199TEST_F(ExtractFunctionTest, CFileRejectArrayTypeof) {
1206 EXPECT_EQ(apply(R
"cpp(
1209 [[__typeof__(arr) copy;]]
1211 "fail: Too complex to extract.");
#define TWEAK_TEST(TweakID)
A context is an immutable container for per-request data that must be propagated through layers that ...
FIXME: Skip testing on windows temporarily due to the different escaping code mode.
TEST_F(BackgroundIndexTest, NoCrashOnErrorFile)
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//