mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 21:46:05 +00:00

particular don't assume that two declarations of the same kind in the same context are declaring the same entity. That's not true when the same name is declared multiple times as internal-linkage symbols within a module. (getCanonicalDecl is cheap now, so we can just use it here.) llvm-svn: 251898
13 lines
374 B
C++
13 lines
374 B
C++
// RUN: rm -rf %t
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-local-submodule-visibility -I%S/Inputs/internal-constants %s -verify
|
|
|
|
// expected-no-diagnostics
|
|
#include "c.h"
|
|
|
|
int q = h();
|
|
int r = N::k;
|
|
|
|
#include "b.h"
|
|
|
|
int s = N::k; // FIXME: This should be ambiguous if we really want internal linkage declarations to not collide.
|