[PATCH] D92006: Refactoring the attrubute plugin example to fit the new API
Yafei Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 9 18:03:58 PST 2020
psionic12 marked 5 inline comments as done.
psionic12 added inline comments.
================
Comment at: clang/test/Frontend/plugin-attribute.cpp:1
-// RUN: %clang -fplugin=%llvmshlibdir/Attribute%pluginext -emit-llvm -S %s -o - 2>&1 | FileCheck %s --check-prefix=ATTRIBUTE
-// RUN: not %clang -fplugin=%llvmshlibdir/Attribute%pluginext -emit-llvm -DBAD_ATTRIBUTE -S %s -o - 2>&1 | FileCheck %s --check-prefix=BADATTRIBUTE
+// RUN: split-file %s %t
+// RUN: %clang -cc1 -load %llvmshlibdir/Attribute%pluginext -fsyntax-only -ast-dump -verify %t/good_attr.cpp | FileCheck %s
----------------
aaron.ballman wrote:
> I am unfamiliar with this construct -- is there a reason to do this as opposed to making two separate files with separate content (these are testing fundamentally different things)?
I just followed the suggestion from [[ https://llvm.org/docs/TestingGuide.html#extra-files | this ]], the document suggest that if the testing files are small, considered to put them in a single file, and use the split-file command. I think the testing infrastructure treat this as two files when testing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92006/new/
https://reviews.llvm.org/D92006
More information about the cfe-commits
mailing list