1*67e74705SXin Li // RUN: %clang_cc1 -fdelayed-template-parsing -load %llvmshlibdir/PrintFunctionNames%pluginext -plugin print-fns -plugin-arg-print-fns -parse-template -plugin-arg-print-fns ForcedTemplate %s 2>&1 | FileCheck %s 2*67e74705SXin Li // REQUIRES: plugins, examples 3*67e74705SXin Li 4*67e74705SXin Li template <typename T> 5*67e74705SXin Li void TemplateDep(); 6*67e74705SXin Li 7*67e74705SXin Li // CHECK: top-level-decl: "ForcedTemplate" 8*67e74705SXin Li // The plugin should force parsing of this template, even though it's 9*67e74705SXin Li // not used and -fdelayed-template-parsing is specified. 10*67e74705SXin Li // CHECK: warning: expression result unused 11*67e74705SXin Li // CHECK: late-parsed-decl: "ForcedTemplate" 12*67e74705SXin Li template <typename T> ForcedTemplate()13*67e74705SXin Livoid ForcedTemplate() { 14*67e74705SXin Li TemplateDep<T>(); // Shouldn't crash. 15*67e74705SXin Li 16*67e74705SXin Li ""; // Triggers the warning checked for above. 17*67e74705SXin Li } 18