Issue 120857
Summary [Clang] parser error
Labels clang
Assignees
Reporter TrofiMichael
    
I'm trying to compile the following code:
```
class BigInteger {
  friend bool operator==(const BigInteger&, const BigInteger&);
  friend class Rational;
};

bool operator==(const BigInteger&, const BigInteger&) = default;

int main() {}
```
With clang++ -std=c++20

The compiler gives a parser error. 
The next three files contain a compilation log, a cpp file and a sh file.

 
- [compilation_log.txt](https://github.com/user-attachments/files/18219989/compilation_log.txt)
- [clang_issue_cpp.txt](https://github.com/user-attachments/files/18220002/clang_issue_cpp.txt)
- [clang_issue_sh.txt](https://github.com/user-attachments/files/18220004/clang_issue_sh.txt)

All the following versions of clang fail to compile this:
- clang 20.0.0git
- x86-64 clang from 19.1.0 to 15.0.0


_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to