================ @@ -880,6 +880,37 @@ TEST(MinimizeSourceToDependencyDirectivesTest, EXPECT_EQ(pp_eof, Directives[22].Kind); } +TEST(MinimizeSourceToDependencyDirectivesTest, + TestFixedBugThatReportUnterminatedDirectiveFalsely) { + SmallVector<char, 512> Out; + SmallVector<dependency_directives_scan::Token, 16> Tokens; + SmallVector<Directive, 16> Directives; + + StringRef Input = "#ifndef __TEST \n" + "#define __TEST \n" + "#if defined(__TEST_DUMMY) \n" + "#if defined(__TEST_DUMMY2) \n" + "#pragma GCC warning \\ \n" + "\"hello!\"\n" + "#else\n" ---------------- Bigcheese wrote:
I'm pretty sure that everything here should be removed except for: ``` #ifndef __TEST #define __TEST #endif // #ifndef __TEST ``` But I don't think that matters for this fix. https://github.com/llvm/llvm-project/pull/146645 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits