diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
commit | 676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch) | |
tree | 02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /test/Driver/cl-idl.cpp | |
parent | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff) |
Diffstat (limited to 'test/Driver/cl-idl.cpp')
-rw-r--r-- | test/Driver/cl-idl.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Driver/cl-idl.cpp b/test/Driver/cl-idl.cpp new file mode 100644 index 0000000000000..7843ab31334ab --- /dev/null +++ b/test/Driver/cl-idl.cpp @@ -0,0 +1,18 @@ +// Note: %s must be preceded by --, otherwise it may be interpreted as a +// command-line option, e.g. on Mac where %s is commonly under /Users. + +// Test that 'clang-cl /E' treats inputs as C++ if the extension is +// unrecognized. midl relies on this. See PR40140. + +// Use a plain .cpp extension first. +// RUN: %clang_cl /E -- %s | FileCheck %s + +// Copy to use .idl as the extension. +// RUN: cp %s %t.idl +// RUN: %clang_cl /E -- %t.idl | FileCheck %s + +#ifdef __cplusplus +struct IsCPlusPlus {}; +#endif + +// CHECK: struct IsCPlusPlus {}; |