<div dir="ltr">This doesn't seem like a good permanent solution (as Paul pointed out -std will change in the future). Will you be able to avoid this in the future?</div><div class="gmail_extra"><br><div class="gmail_quote">On 15 November 2017 at 11:38, Sam McCall via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: sammccall<br>
Date: Wed Nov 15 11:38:09 2017<br>
New Revision: 318327<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=318327&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=318327&view=rev</a><br>
Log:<br>
[clangd] Try to unbreak tests on PS4 by targeting PC explicitly<br>
<br>
Modified:<br>
    clang-tools-extra/trunk/<wbr>clangd/<wbr>GlobalCompilationDatabase.cpp<br>
<br>
Modified: clang-tools-extra/trunk/<wbr>clangd/<wbr>GlobalCompilationDatabase.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.cpp?rev=318327&r1=318326&r2=318327&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/clang-tools-extra/<wbr>trunk/clangd/<wbr>GlobalCompilationDatabase.cpp?<wbr>rev=318327&r1=318326&r2=<wbr>318327&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- clang-tools-extra/trunk/<wbr>clangd/<wbr>GlobalCompilationDatabase.cpp (original)<br>
+++ clang-tools-extra/trunk/<wbr>clangd/<wbr>GlobalCompilationDatabase.cpp Wed Nov 15 11:38:09 2017<br>
@@ -31,7 +31,11 @@ static void addExtraFlags(tooling::Compi<br>
 }<br>
<br>
 tooling::CompileCommand getDefaultCompileCommand(<wbr>PathRef File) {<br>
-  std::vector<std::string> CommandLine{"clang", "-fsyntax-only", File.str()};<br>
+  // We don't specify --std because we want to infer it from the filename.<br>
+  // We force PC because PS4 will change --std from under us.<br>
+  // FIXME: there must be a more principled way to do this!<br>
+  std::vector<std::string> CommandLine{<br>
+      "clang", "-fsyntax-only", "-triple=unknown-pc-unknown", File.str()};<br>
   return tooling::CompileCommand(llvm::<wbr>sys::path::parent_path(File),<br>
                                  llvm::sys::path::filename(<wbr>File), CommandLine,<br>
                                  /*Output=*/"");<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>