> +/// \brief Describes the different kinds of language linkage
> +/// (C++ [dcl.link]) that an entity may have.
> +enum LanguageLinkage {
> +  CLanguageLinkage,
> +  CXXLanguageLinkage,
> +  NoLanguageLinkage
> +};
>
> Is there a reason to keep this separate from LinkageSpecDecl::LanguageIDs?

That has only c and c++. Do you think it makes sense to add a lang_none?


> +// This is OK. Both test2_f don't have language linkage since they have
> +// internal linkage.
>  extern "C" {
> -  static void test2_f() { // expected-note {{previous definition is here}}
> +  static void test2_f() {
>    }
> -  static void test2_f(int x) { // expected-error {{conflicting types for
> 'test2_f'}}
> +  static void test2_f(int x) {
>    }
>  }
>
> Please add a CodeGen test to ensure that we give these two functions
> different mangled names.
>

Good catch, we were producing code for just one of the functions.
Updated patch attached.

Cheers,
Rafael

Attachment: t.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to