summaryrefslogtreecommitdiff
path: root/test/PCH
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-03-18 22:23:49 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-03-18 22:23:49 +0000
commit0378433dcdf9a5701207c2a592b10da71ad9ba5d (patch)
tree175903a685476166380bdee3a84024cf0af6be76 /test/PCH
parent4882fe02d8d453084da563b9c18eb5545f0783d4 (diff)
downloadclang-0378433dcdf9a5701207c2a592b10da71ad9ba5d.tar.gz
clang-0378433dcdf9a5701207c2a592b10da71ad9ba5d.tar.bz2
clang-0378433dcdf9a5701207c2a592b10da71ad9ba5d.tar.xz
[PCH] Fix assertion hit related to enum decls inside templated funtions.
Report and suggested fix by Tom Honermann! http://llvm.org/bugs/show_bug.cgi?id=13020 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/PCH')
-rw-r--r--test/PCH/cxx-templates.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/PCH/cxx-templates.h b/test/PCH/cxx-templates.h
index 3dda059026..00631ddbfb 100644
--- a/test/PCH/cxx-templates.h
+++ b/test/PCH/cxx-templates.h
@@ -246,3 +246,16 @@ struct __mt_alloc {
}
};
}
+
+namespace PR13020 {
+template<typename T>
+void f() {
+ enum E {
+ enumerator
+ };
+
+ T t = enumerator;
+}
+
+template void f<int>();
+}