diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-09-20 01:15:31 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-09-20 01:15:31 +0000 |
commit | 541b38be7bf3afded3269a33586418254d82d7b3 (patch) | |
tree | 50251df12a54fbe196671445b8eee3d1a785b8cd /clang/test/SemaCXX/cxx0x-initializer-references.cpp | |
parent | 508939428d005dff37df7f2131aeb06ed674b719 (diff) | |
download | bcm5719-llvm-541b38be7bf3afded3269a33586418254d82d7b3.tar.gz bcm5719-llvm-541b38be7bf3afded3269a33586418254d82d7b3.zip |
Switch the semantic DeclContext for a block-scope declaration of a function or
variable from being the function to being the enclosing namespace scope (in
C++) or the TU (in C). This allows us to fix a selection of related issues
where we would build incorrect redeclaration chains for such declarations, and
fail to notice type mismatches.
Such declarations are put into a new IdentifierNamespace, IDNS_LocalExtern,
which is only found when searching scopes, and not found when searching
DeclContexts. Such a declaration is only made visible in its DeclContext if
there are no non-LocalExtern declarations.
llvm-svn: 191064
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-initializer-references.cpp')
-rw-r--r-- | clang/test/SemaCXX/cxx0x-initializer-references.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/cxx0x-initializer-references.cpp b/clang/test/SemaCXX/cxx0x-initializer-references.cpp index 48236fdf76f..9096c8a1c2d 100644 --- a/clang/test/SemaCXX/cxx0x-initializer-references.cpp +++ b/clang/test/SemaCXX/cxx0x-initializer-references.cpp @@ -36,10 +36,10 @@ namespace reference { }; void call() { - void f(const int&); + one f(const int&); f({1}); - void g(int&); // expected-note {{passing argument}} + one g(int&); // expected-note {{passing argument}} g({1}); // expected-error {{cannot bind to an initializer list temporary}} int i = 0; g({i}); |