8f257e74d3
This is the only way not to confuse the diagnostics engine of upgraded clang. Also, this gives us a few advantages: * We can compare more precisely the source locations of diagnostics; * We can merge the code completion code path which works with file entries; * We can rely better when specifying //expected-note-s in different files.
20 lines
829 B
C
20 lines
829 B
C
//------------------------------------------------------------------------------
|
|
// 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
|
|
|
|
class MyClass{}; // expected-note {{previous definition is here}}
|
|
struct MyClass{} // expected-error {{redefinition of 'MyClass'}}
|
|
MyClass * s; // expected-note {{previous definition is here}}
|
|
MyClass s; // expected-error {{redefinition of 's'}}
|
|
|
|
const char* a = "test"; // expected-note {{previous definition is here}}
|
|
const char* a = ""; // expected-error {{redefinition of 'a'}}
|
|
|
|
.q
|