Mercurial > hg > CbC > CbC_llvm
diff clang/test/Driver/cl-idl.cpp @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/clang/test/Driver/cl-idl.cpp Thu Feb 13 15:10:13 2020 +0900 @@ -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 {};