[PATCH] D88680: Add ability to turn off -fpch-instantiate-templates in clang-cl

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 6 02:27:35 PDT 2020


hans added inline comments.


================
Comment at: clang/test/Driver/pch-instantiate-templates.c:2
+// CL driver test cases
+// RUN: %clang_cl -### /Yc /Fpfoo.pch /Fofoo.obj %s 2>&1 | FileCheck --check-prefix=CLANG_CL_YC %s
+// RUN: %clang -### --driver-mode=cl /Yc /Fpfoo.pch /Fofoo.obj %s 2>&1 | FileCheck --check-prefix=CLANG_CL_YC %s
----------------
Please always put "--" before the %s argument to avoid the compiler possibly misinterpreting the filename as a command-line flag (see comment at the top of clang/test/Driver/cl-options.c). This applies to all cl-mode clang invocations.


================
Comment at: clang/test/Driver/pch-instantiate-templates.c:3
+// RUN: %clang_cl -### /Yc /Fpfoo.pch /Fofoo.obj %s 2>&1 | FileCheck --check-prefix=CLANG_CL_YC %s
+// RUN: %clang -### --driver-mode=cl /Yc /Fpfoo.pch /Fofoo.obj %s 2>&1 | FileCheck --check-prefix=CLANG_CL_YC %s
+// RUN: %clang_cl -### /Yc /Fpfoo.pch /Fofoo.obj -fno-pch-instantiate-templates %s 2>&1 | FileCheck --check-prefix=CLANG_CL_YC_DISABLE %s
----------------
This "%clang -### --driver-mode=cl" invocation seems redundant with the %clang_cl test above. I'd suggest dropping it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88680



More information about the cfe-commits mailing list