mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-28 15:58:57 -04:00

Normal name lookup ignores any hidden declarations. When name lookup for builtin declarations fails, we just synthesize a new declaration at the point of use. With modules, this could lead to multiple declarations of the same builtin, if one came from a (hidden) submodule that was later made visible. Teach name lookup to always find builtin names, so we don't create these redundant declarations in the first place. llvm-svn: 178711
17 lines
269 B
Objective-C
17 lines
269 B
Objective-C
@import builtin;
|
|
|
|
int foo() {
|
|
return __builtin_object_size(p, 0);
|
|
}
|
|
|
|
@import builtin.sub;
|
|
|
|
int bar() {
|
|
return __builtin_object_size(p, 0);
|
|
}
|
|
|
|
|
|
// RUN: rm -rf %t
|
|
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -I %S/Inputs %s -verify
|
|
// expected-no-diagnostics
|