[clang-tools-extra] r269894 - [include-fixer] Run tests with -fno-ms-compatibility.

Benjamin Kramer via cfe-commits cfe-commits at lists.llvm.org
Wed May 18 02:28:45 PDT 2016


Author: d0k
Date: Wed May 18 04:28:45 2016
New Revision: 269894

URL: http://llvm.org/viewvc/llvm-project?rev=269894&view=rev
Log:
[include-fixer] Run tests with -fno-ms-compatibility.

Something behind that flag makes us get fewer typo correction callbacks,
unbreak the tests on windows for now.

Modified:
    clang-tools-extra/trunk/unittests/include-fixer/IncludeFixerTest.cpp

Modified: clang-tools-extra/trunk/unittests/include-fixer/IncludeFixerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/include-fixer/IncludeFixerTest.cpp?rev=269894&r1=269893&r2=269894&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/include-fixer/IncludeFixerTest.cpp (original)
+++ clang-tools-extra/trunk/unittests/include-fixer/IncludeFixerTest.cpp Wed May 18 04:28:45 2016
@@ -27,7 +27,9 @@ static bool runOnCode(tooling::ToolActio
       new vfs::InMemoryFileSystem);
   llvm::IntrusiveRefCntPtr<FileManager> Files(
       new FileManager(FileSystemOptions(), InMemoryFileSystem));
-  std::vector<std::string> Args = {"include_fixer", "-fsyntax-only", FileName};
+  // FIXME: Investigate why -fms-compatibility breaks tests.
+  std::vector<std::string> Args = {"include_fixer", "-fsyntax-only",
+                                   "-fno-ms-compatibility", FileName};
   Args.insert(Args.end(), ExtraArgs.begin(), ExtraArgs.end());
   tooling::ToolInvocation Invocation(
       Args, ToolAction, Files.get(),
@@ -130,8 +132,6 @@ TEST(IncludeFixer, MinimizeInclude) {
             runIncludeFixer("a::b::foo bar;\n", IncludePath));
 }
 
-#ifndef _WIN32
-// It doesn't pass for targeting win32. Investigating.
 TEST(IncludeFixer, NestedName) {
   // Some tests don't pass for target *-win32.
   std::vector<std::string> args = {"-target", "x86_64-unknown-unknown"};
@@ -149,7 +149,6 @@ TEST(IncludeFixer, NestedName) {
             "namespace a {}\nint a = a::b::foo(0);\n",
             runIncludeFixer("namespace a {}\nint a = a::b::foo(0);\n", args));
 }
-#endif
 
 TEST(IncludeFixer, MultipleMissingSymbols) {
   EXPECT_EQ("#include <string>\nstd::string bar;\nstd::sting foo;\n",




More information about the cfe-commits mailing list