[PATCH] D144188: Tighten up a modules test
Paul Robinson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 16 07:26:45 PST 2023
probinson added a comment.
I looked at this test only because it caused a merge conflict downstream. While it does work, it will not catch some kinds of mistakes; by being less specific in the "not" checks, it will catch more potential problems.
================
Comment at: clang/test/CXX/module/basic/basic.def.odr/p4.cppm:5
//
-// RUN: %clang_cc1 -std=c++20 %t/Module.cppm -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %t/Module.cppm --implicit-check-not unused_inline --implicit-check-not unused_stastic_global_module
//
----------------
Note the typo "unused_sta*s*tic_global_module"
Simpler to reject all "unused" strings.
================
Comment at: clang/test/CXX/module/basic/basic.def.odr/p4.cppm:88
-// CHECK-NOT: define {{(dso_local )?}}void {{.*}}@_ZW6Module28unused_static_module_linkagev
static void unused_static_module_linkage() {}
----------------
This CHECK-NOT is overly specific. For example,
`define dso_local hidden void ...`
would not match, and therefore pass, when it should not.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144188/new/
https://reviews.llvm.org/D144188
More information about the cfe-commits
mailing list