From 3e22e9e78e80545f5b09923877ac32be0b0c58df Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Thu, 12 Jan 2017 10:17:42 +0100 Subject: [PATCH] Move from KnownFail, now that it works! --- test/Prompt/ClashingDecls.C | 11 +++++++++++ test/Prompt/ClashingDeclsKnownFail.C | 23 ----------------------- 2 files changed, 11 insertions(+), 23 deletions(-) delete mode 100644 test/Prompt/ClashingDeclsKnownFail.C diff --git a/test/Prompt/ClashingDecls.C b/test/Prompt/ClashingDecls.C index 4d95a764..658d5105 100644 --- a/test/Prompt/ClashingDecls.C +++ b/test/Prompt/ClashingDecls.C @@ -26,4 +26,15 @@ int injected = 13; // expected-error {{declaration conflicts with target of usin extern "C" double likeSin(double); // expected-note {{previous definition is here}} int likeSin = 14; // expected-error {{redefinition of 'likeSin' as different kind of symbol}} +// Test a weakness in the declaration extraction of types (ROOT-5248). +class MyClass; // this type... +extern MyClass* my; +class MyClass { // and that type used to not be redecls +public: + MyClass* getMyClass() { + return 0; + } +} cl; +MyClass* my = cl.getMyClass(); + .q diff --git a/test/Prompt/ClashingDeclsKnownFail.C b/test/Prompt/ClashingDeclsKnownFail.C deleted file mode 100644 index b85d9913..00000000 --- a/test/Prompt/ClashingDeclsKnownFail.C +++ /dev/null @@ -1,23 +0,0 @@ -//------------------------------------------------------------------------------ -// CLING - the C++ LLVM-based InterpreterG :) -// -// This file is dual-licensed: you can choose to license it under the University -// of Illinois Open Source License or the GNU Lesser General Public License. See -// LICENSE.TXT for details. -//------------------------------------------------------------------------------ - -// RUN: cat %s | %cling -Xclang -verify - -// The test exposes a weakness in the declaration extraction of types. As -// reported in issue ROOT-5248. - -class MyClass; -extern MyClass* my; -class MyClass { -public: - MyClass* getMyClass() { - return 0; - } -} cl; -// The next line should work without complaints! -MyClass* my = cl.getMyClass();