]> granicus.if.org Git - clang/commit
When a tag is declared in prototype scope in C, if we've decided that it
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 11 Jan 2016 22:41:53 +0000 (22:41 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 11 Jan 2016 22:41:53 +0000 (22:41 +0000)
commita454e263124ae7949ab96d33987dc590c3ccf90c
treefc59dcbb5458249e619eaad685c49e9f757a3651
parentd22eccf82560826415ac761375a9ea8bace7c899
When a tag is declared in prototype scope in C, if we've decided that it
redeclares an existing tag but are creating a new declaration anyway (because
it has attributes or changes the visibility of the name), don't warn that it
won't be visible outside the current scope. That's not true.

Also narrow down the set of cases where we create these extra declarations when
building modules; previously, all tag declarations but the first in a module
header would get this treatment if -fmodules-local-submodule-visibility. (This
isn't a functional change, but we try to avoid creating these extra
declarations whenever we can.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257403 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
test/Modules/tag-injection.c [new file with mode: 0644]
test/Sema/decl-in-prototype.c