• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -std=c++1y -triple i386-pc-win32 -fms-compatibility -fms-extensions -fsyntax-only -verify %s
2 // expected-no-diagnostics
3 
foo()4 int foo() {
5   static_assert(sizeof(__FUNCDNAME__) == 12, "?foo@@YAHXZ");
6   return 0;
7 }
8 
9 // Within templates.
10 template <typename T>
baz()11 int baz() {
12   static_assert(sizeof(__FUNCDNAME__) == 16, "??$baz@H@@YAHXZ");
13 
14   return 0;
15 }
16 
17 struct A {
AA18   A() {
19     static_assert(sizeof(__FUNCDNAME__) == 13, "??0A@@QAE@XZ");
20   }
~AA21   ~A() {
22     static_assert(sizeof(__FUNCDNAME__) == 13, "??1A@@QAE@XZ");
23   }
24 };
25 
main()26 int main() {
27   static_assert(sizeof(__FUNCDNAME__) == 5, "main");
28 
29   baz<int>();
30 
31   return 0;
32 }
33