From 8f19037d2b0aab8690e82273578c3b675ae55cd4 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sat, 16 Jun 2012 06:04:05 +0000 Subject: [PATCH] ToolingTest.cpp: Fix r158592, runToolOnCode.FindsNoTopLevelDeclOnEmptyCode on msvc. LangOpts.MicrosoftExt still appends "class type_info;". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158595 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Tooling/ToolingTest.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/unittests/Tooling/ToolingTest.cpp b/unittests/Tooling/ToolingTest.cpp index 526aa8059a..f6681f8153 100644 --- a/unittests/Tooling/ToolingTest.cpp +++ b/unittests/Tooling/ToolingTest.cpp @@ -57,7 +57,12 @@ TEST(runToolOnCode, FindsNoTopLevelDeclOnEmptyCode) { bool FoundTopLevelDecl = false; EXPECT_TRUE(runToolOnCode( new TestAction(new FindTopLevelDeclConsumer(&FoundTopLevelDecl)), "")); +#if !defined(_MSC_VER) EXPECT_FALSE(FoundTopLevelDecl); +#else + // FIXME: LangOpts.MicrosoftExt appends "class type_info;" + EXPECT_TRUE(FoundTopLevelDecl); +#endif } namespace { -- 2.40.0