dexonsmith added inline comments.

================
Comment at: clang/unittests/Tooling/ToolingTest.cpp:238-245
   Args.push_back("tool-executable");
-  Args.push_back("-target");
-  // Invalid argument that by default results in an error diagnostic:
-  Args.push_back("i386-apple-ios14.0-simulator");
-  // Argument that downgrades the error into a warning:
-  Args.push_back("-Wno-error=invalid-ios-deployment-target");
+  // Invalid argument (non-existent sysroot path) that will result in a 
warning.
+  Args.push_back("-isysroot");
+  Args.push_back("/dev/null/sysroot");
+  // Argument that will suppress the warning above.
+  Args.push_back("-Wno-missing-sysroot");
   Args.push_back("-fsyntax-only");
----------------
I'm worried this is going to behave differently when the unit test isn't run on 
Darwin, since I think `-isysroot` is only valid for Darwin targets and there's 
no `-arch` or `-target` option. Can you confirm whether this should reproduce 
properly when run on other hosts as well?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110160/new/

https://reviews.llvm.org/D110160

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to