From: Sam McCall Date: Wed, 15 Nov 2017 21:33:56 +0000 (+0000) Subject: [clangd] Revert broken r318329 and disable tests on PS4 X-Git-Tag: llvmorg-6.0.0-rc1~3301 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e90fd06723d368cc95debac74ecb4ab54659f24a;p=platform%2Fupstream%2Fllvm.git [clangd] Revert broken r318329 and disable tests on PS4 (Clearly this is not a permanent solution) llvm-svn: 318337 --- diff --git a/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp b/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp index 4466e40..1db3e66 100644 --- a/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp +++ b/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp @@ -31,11 +31,7 @@ static void addExtraFlags(tooling::CompileCommand &Command, } tooling::CompileCommand getDefaultCompileCommand(PathRef File) { - // We don't specify --std because we want to infer it from the filename. - // We force PC because PS4 will change --std from under us. - // FIXME: there must be a more principled way to do this! - std::vector CommandLine{ - "clang", "-fsyntax-only", "-target=unknown-pc-unknown", File.str()}; + std::vector CommandLine{"clang", "-fsyntax-only", File.str()}; return tooling::CompileCommand(llvm::sys::path::parent_path(File), llvm::sys::path::filename(File), CommandLine, /*Output=*/""); diff --git a/clang-tools-extra/test/clangd/lit.local.cfg b/clang-tools-extra/test/clangd/lit.local.cfg new file mode 100644 index 0000000..ef338c7 --- /dev/null +++ b/clang-tools-extra/test/clangd/lit.local.cfg @@ -0,0 +1,6 @@ +import re +# We rely on the default -std being derived from the filetype. +# PS4 sets a different -std, and many tests break. +# FIXME: make our tests less brittle instead. +if re.match(r'.*-scei-ps4', config.target_triple): + config.unsupported = True