-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[C++20] [Modules] Don't diagnose on invisible namesapce
Close #73893 As the issue shows, generally, the diagnose information for invisible namespace is confusing more than helpful. Also this patch implements the same solution as suggested in the issue: don't diagnose on invisible namespace.
- Loading branch information
1 parent
a01392c
commit db3d0e4
Showing
6 changed files
with
56 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// RUN: rm -rf %t | ||
// RUN: mkdir -p %t | ||
// RUN: split-file %s %t | ||
// | ||
// RUN: %clang_cc1 -std=c++20 %t/foo.cppm -I%t -emit-module-interface -o %t/foo.pcm | ||
// RUN: %clang_cc1 -std=c++20 %t/use.cc -fmodule-file=foo=%t/foo.pcm -fsyntax-only -verify | ||
|
||
//--- foo.h | ||
namespace foo { | ||
|
||
} | ||
|
||
//--- foo.cppm | ||
module; | ||
#include "foo.h" | ||
export module foo; | ||
|
||
//--- use.cc | ||
import foo; | ||
void use() { | ||
foo::bar(); // expected-error {{no member named 'bar' in namespace 'foo'}} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters