]> granicus.if.org Git - clang/commit
Remove -Winternal-linkage-in-inline in C++.
authorJordan Rose <jordan_rose@apple.com>
Wed, 20 Jun 2012 18:50:06 +0000 (18:50 +0000)
committerJordan Rose <jordan_rose@apple.com>
Wed, 20 Jun 2012 18:50:06 +0000 (18:50 +0000)
commit33c0f3703de3ab6d8f3a41d7fb9d2b3489617b21
tree81268e1b51772add37ef26eb5fc2cb6155b128d3
parent52e4ed949ba52958db1e938860e3b49944ce8680
Remove -Winternal-linkage-in-inline in C++.

It's very easy for anonymous external linkage to propagate in C++ through
return types and parameter types. Likewise, it's possible that a template
containing an inline function is only used with parameters that have internal
linkage. Actually diagnosing where the internal linkage comes from is fairly
difficult (both to locate and then to print nicely). Finally, since we only
have one translation unit available, we can't even prove that any of this
violates the ODR.

This warning needs better-defined behavior in C++ before it can really go in.

Rewording of the C warning (which /is/ specified by C99) coming shortly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158836 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaExpr.cpp
test/SemaCXX/inline.cpp