From: Alexey Bataev Date: Mon, 13 Oct 2014 03:27:35 +0000 (+0000) Subject: PredefinedExpr deserialization test in dependent context. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=46bb1befc59697ae537e65575520be18c602069a;p=clang PredefinedExpr deserialization test in dependent context. 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 --- diff --git a/test/CodeGenCXX/predefined-expr-cxx14.cpp b/test/CodeGenCXX/predefined-expr-cxx14.cpp index 73b9295e12..0b10fe5e02 100644 --- a/test/CodeGenCXX/predefined-expr-cxx14.cpp +++ b/test/CodeGenCXX/predefined-expr-cxx14.cpp @@ -74,7 +74,17 @@ struct ClassBlockConstr { } }; -int main() { +template +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 FTi; + (void)FTi.getFunc(); +} #endif