File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -610,7 +610,10 @@ def build_test_case(self):
610
610
res += "#if LLVM_HAS_NVPTX_TARGET\n "
611
611
612
612
res += f"""TEST_P(ASTMatchersDocTest, docs_{ self .line + 1 } ) {{
613
- const StringRef Code = R"cpp(\n { "\t #include \" cuda.h\" \n " if has_cuda else "" } { self .code } )cpp";\n """
613
+ const StringRef Code = R"cpp(\n """
614
+ if has_cuda :
615
+ res += '\t #include "cuda.h"\n '
616
+ res += f'{ self .code } )cpp";\n '
614
617
615
618
if self .has_headers ():
616
619
res += f"\t const FileContentMappings VirtualMappedFiles = {{{ self .get_formated_headers ()} }};"
@@ -1058,6 +1061,7 @@ def group_doc_comment_and_followed_code(
1058
1061
1059
1062
return result
1060
1063
1064
+
1061
1065
test_file_begin = """
1062
1066
// unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp - AST matcher unit tests//
1063
1067
//
@@ -1117,6 +1121,7 @@ def group_doc_comment_and_followed_code(
1117
1121
} // namespace clang
1118
1122
"""
1119
1123
1124
+
1120
1125
def main ():
1121
1126
args = parse_arguments ()
1122
1127
@@ -1162,5 +1167,6 @@ def main():
1162
1167
1163
1168
exit (1 )
1164
1169
1170
+
1165
1171
if __name__ == "__main__" :
1166
1172
main ()
You can’t perform that action at this time.
0 commit comments