]> granicus.if.org Git - clang/commit
Allow adding dll attributes on certain redecls with a warning if the decl hasn't...
authorHans Wennborg <hans@hanshq.net>
Wed, 27 Aug 2014 21:27:40 +0000 (21:27 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 27 Aug 2014 21:27:40 +0000 (21:27 +0000)
commiteaf4ee9a6f888acbe933ab41d32bfa4bd2f1feb0
treed92697fbeb251e9c5c5efd3b3c74563efeb9cab5
parent926a507ee587f1455010dca59ffd0253d2bf70ff
Allow adding dll attributes on certain redecls with a warning if the decl hasn't been used yet (PR20746)

This shouldn't really be allowed, but it comes up in real code (see PR). As
long as the decl hasn't been used there's no technical difficulty in supporting
it, so downgrade the error to a warning.

Differential Revision: http://reviews.llvm.org/D5087

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216619 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDecl.cpp
test/Sema/dllexport.c
test/Sema/dllimport.c
test/SemaCXX/dllexport.cpp
test/SemaCXX/dllimport.cpp