]> granicus.if.org Git - clang/commitdiff
PredefinedExpr deserialization test in dependent context.
authorAlexey Bataev <a.bataev@hotmail.com>
Mon, 13 Oct 2014 03:27:35 +0000 (03:27 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Mon, 13 Oct 2014 03:27:35 +0000 (03:27 +0000)
For commit r219561 - Fix deserialization of PredefinedExpr in dependent context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219594 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/predefined-expr-cxx14.cpp

index 73b9295e128ad224bd3f760207d8bebe92772b4a..0b10fe5e022068dc34769c0705494a5cfaae678e 100644 (file)
@@ -74,7 +74,17 @@ struct ClassBlockConstr {
   }
 };
 
-int main() {
+template <class T>
+class FuncTemplate {
+  const char *Func;
+
+public:
+  FuncTemplate() : Func(__func__) {}
+  const char *getFunc() const { return Func; }
+};
+
+int
+main() {
   int a;
   ClassInTopLevelNamespace topLevelNamespace;
   ClassBlockConstr classBlockConstr;
@@ -86,5 +96,10 @@ int main() {
   t.classTemplateFunction(a);
   return 0;
 }
+#else
+void Foo() {
+  FuncTemplate<int> FTi;
+  (void)FTi.getFunc();
+}
 #endif