diff --git a/test/ErrorRecovery/CannotDotX.h b/test/ErrorRecovery/CannotDotX.h index 98cf99e5..2b71cd02 100644 --- a/test/ErrorRecovery/CannotDotX.h +++ b/test/ErrorRecovery/CannotDotX.h @@ -8,6 +8,7 @@ extern "C" int printf(const char* fmt, ...); -class MyClass { +struct MyClass { MyClass() { printf("MyClass ctor called!\n"); } + ~MyClass() { printf("MyClass dtor called!\n"); } }; diff --git a/test/ErrorRecovery/MetaProcessor.C b/test/ErrorRecovery/MetaProcessor.C index c62c9605..948c4313 100644 --- a/test/ErrorRecovery/MetaProcessor.C +++ b/test/ErrorRecovery/MetaProcessor.C @@ -6,27 +6,18 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s -// XFAIL: * +// RUN: cat %s | %cling -I%p -Xclang -verify 2>&1 | FileCheck %s + // The main issue is that expected - error is not propagated to the source file and // the expected diagnostics get misplaced. -.storeState "testMetaProcessor" - -.x CannotDotX.h() // expected-error@2 {{use of undeclared identifier 'CannotDotX'}} -// CHECK: Error in cling::MetaProcessor: execute file failed. .x CannotDotX.h() -// CHECK: Error in cling::MetaProcessor: execute file failed. -// expected-error@3 3 {{redefinition of 'MyClass'}} -// expected-error@4 3 {{expected member name or ';' after declaration specifiers}} -// expected-note@3 3 {{previous definition is here}} +// expected-error@2 {{use of undeclared identifier 'CannotDotX'}} // Here we cannot revert MyClass from CannotDotX.h .L CannotDotX.h -// CHECK: Error in cling::MetaProcessor: load file failed. +MyClass m; +// CHECK: MyClass ctor called .L CannotDotX.h -// CHECK: Error in cling::MetaProcessor: load file failed. - -.compareState "testMetaProcessor" -// CHECK-NOT: File with AST differencies stored in: testMetaProcessorAST.diff +// CHECK: MyClass dtor called .q