diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-06-18 17:49:58 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-06-18 17:49:58 +0000 |
commit | 11b46a0a49075f338eb4849c2b7d680945be9250 (patch) | |
tree | 52ba718f22081da7a8d580c954a710e6f62c0c6d /include/clang | |
parent | 790880bc3a0d8a176f1bdea4e79f60f5c7c2b2d7 (diff) |
Allow internal decls in inline functions if the function is in the main file.
This handles the very common case of people writing inline functions in their
main source files and not tagging them as inline. These cases should still
behave as the user intended. (The diagnostic is still emitted as an extension.)
I'm reworking this code anyway to account for C++'s equivalent restriction in
[basic.def.odr]p6, but this should get some bots back to green.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 86c1f84668..3b7e052268 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -3000,6 +3000,10 @@ def warn_internal_in_extern_inline : ExtWarn< "%select{function|variable}0 %1 has internal linkage but is used in an " "inline %select{function|method}2 with external linkage">, InGroup<DiagGroup<"internal-linkage-in-inline"> >; +def ext_internal_in_extern_inline : Extension< + "%select{function|variable}0 %1 has internal linkage but is used in an " + "inline %select{function|method}2 with external linkage">, + InGroup<DiagGroup<"internal-linkage-in-inline"> >; def note_internal_decl_declared_here : Note< "%0 declared here">; def note_convert_inline_to_static : Note< |