A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/llvm/llvm-project/issues/50794 below:

Namespace inline mismatch diagnostic refers to unhelpful previous definition · Issue #50794 · llvm/llvm-project · GitHub

Extended Description

See: https://godbolt.org/z/x87K78TnW

Take this C++ code:

1: inline namespace abc {};
2: namespace abc {};
3: namespace abc {};

Clang will emit a warning for line 2, because the namespace is re-opened as non-inline, while the previous definition was inline. It will add a Note for the previous definition, in this case line 1.

However, it will also emit the same warning for line 3. In this case, it would be helpful to have the Note refer to the definition in line 1, but it instead refers to line 2. That is confusing since the problem is the inline mismatch, but the Note refers to a definition that is not inline.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4