19 lines · cpp
1// Note: %s must be preceded by --, otherwise it may be interpreted as a2// command-line option, e.g. on Mac where %s is commonly under /Users.3 4// Test that 'clang-cl /E' treats inputs as C++ if the extension is5// unrecognized. midl relies on this. See PR40140.6 7// Use a plain .cpp extension first.8// RUN: %clang_cl /E -- %s | FileCheck %s9 10// Copy to use .idl as the extension.11// RUN: cp %s %t.idl12// RUN: %clang_cl /E -- %t.idl | FileCheck %s13 14#ifdef __cplusplus15struct IsCPlusPlus {};16#endif17 18// CHECK: struct IsCPlusPlus {};19