mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-18 16:58:23 +00:00
![Richard Smith](/assets/img/avatar_default.png)
internal linkage entities in different modules from r250884 to apply to all names, not just function names. This is really awkward: we don't want to merge internal-linkage symbols from separate modules, because they might not actually be defining the same entity. But we don't want to reject programs that use such an ambiguous symbol if those internal-linkage symbols are in fact equivalent. For now, we're resolving the ambiguity by picking one of the equivalent definitions as an extension. llvm-svn: 252063
14 lines
857 B
C++
14 lines
857 B
C++
// RUN: rm -rf %t
|
|
// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -emit-module -fmodule-name=std -fmodules-cache-path=%t %S/Inputs/libstdcxx-ambiguous-internal/module.modulemap -Werror
|
|
// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -emit-module -fmodule-name=std -fmodules-cache-path=%t %S/Inputs/libstdcxx-ambiguous-internal/module.modulemap -fmodules-local-submodule-visibility -DAMBIGUOUS 2>&1| FileCheck %s
|
|
|
|
// CHECK-NOT: error
|
|
// CHECK: warning: ambiguous use of internal linkage declaration 'f' defined in multiple modules
|
|
// CHECK: note: declared here in module 'std.C'
|
|
// CHECK: note: declared here in module 'std.B'
|
|
// CHECK-NOT: error
|
|
// CHECK: warning: ambiguous use of internal linkage declaration 'n' defined in multiple modules
|
|
// CHECK: note: declared here in module 'std.C'
|
|
// CHECK: note: declared here in module 'std.B'
|
|
// CHECK-NOT: error
|