diff options
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-template.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/mangle-template.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle-template.cpp b/clang/test/CodeGenCXX/mangle-template.cpp index 3b7f3027f6c..9bd74b54a5b 100644 --- a/clang/test/CodeGenCXX/mangle-template.cpp +++ b/clang/test/CodeGenCXX/mangle-template.cpp @@ -182,3 +182,25 @@ namespace test13 { template short returnShort<-32768>(); // CHECK: @_ZN6test1311returnShortILsn32768EEEsv() } + +namespace test14 { + template <typename> inline int inl(bool b) { + if (b) { + static struct { + int field; + } a; + // CHECK: @_ZZN6test143inlIvEEibE1a + + return a.field; + } else { + static struct { + int field; + } a; + // CHECK: @_ZZN6test143inlIvEEibE1a_0 + + return a.field; + } + } + + int call(bool b) { return inl<void>(b); } +} |