Issue |
141039
|
Summary |
[clang-repl] "Duplicate Definition of Symbol" for out of line definition for virtual function
|
Labels |
new issue
|
Assignees |
|
Reporter |
Vipul-Cariappa
|
clang-repl raises "Duplicate Definition of Symbol", when creating an object with an out-of-line virtual function.
```c++
clang-repl> struct Klass { virtual int get_value(); };
clang-repl> int Klass::get_value() { return 0; }
clang-repl> auto x1 = Klass();
error: Duplicate definition of symbol '_ZTV5Klass'
clang-repl> %quit
```
But if the virtual function in defined within the class, it does not raise the error:
```c++
clang-repl> struct Klass { virtual int get_value() { return 0; } };
clang-repl> auto x1 = Klass();
clang-repl> %quit
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs