xref: /llvm-project/clang/test/Misc/clear-ast-before-backend-plugins.c (revision fdb66eda77a00d4ff0cb2730290f0fadf7840770)
1 // REQUIRES: plugins, examples, asserts
2 
3 // RUN: %clang_cc1 -mllvm -debug-only=codegenaction -clear-ast-before-backend -emit-obj -o /dev/null -load %llvmshlibdir/PrintFunctionNames%pluginext %s 2>&1 | FileCheck %s --check-prefix=YES
4 // YES: Clearing AST
5 
6 // RUN: %clang_cc1 -mllvm -debug-only=codegenaction -clear-ast-before-backend -emit-obj -o /dev/null -load %llvmshlibdir/PrintFunctionNames%pluginext -add-plugin print-fns -plugin-arg-print-fns help %s 2>&1 | FileCheck %s --check-prefix=NO
7 // NO-NOT: Clearing AST
8 // NO: top-level-decl: "f"
9 
f()10 void f() {}
11