linkage-spec.cpp revision 6c6fce03ea12b7b8e812fa1b24cfe5aa8705ceca
16c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregor// RUN: clang -fsyntax-only -verify %s 26c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregorextern "C" { 36c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregor extern "C" void f(int); 46c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregor} 56c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregor 66c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregorextern "C++" { 76c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregor extern "C++" int& g(int); 86c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregor float& g(); 96c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregor} 106c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregordouble& g(double); 116c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregor 126c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregorvoid test(int x, double d) { 136c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregor f(x); 146c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregor float &f1 = g(); 156c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregor int& i1 = g(x); 166c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregor double& d1 = g(d); 176c6fce03ea12b7b8e812fa1b24cfe5aa8705cecaDouglas Gregor} 18