mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Merge remote-tracking branch 'origin/topic/vern/CPP-when-capture-naming'
* origin/topic/vern/CPP-when-capture-naming: fixed "-O gen-C++" naming of "when" captures to avoid ambiguities due to inlining Simplified & made more robust maintenance helper script for "-O gen-C++" testing "-a cpp" baseline updates to reflect recent BTest changes
This commit is contained in:
commit
821218e7b2
6 changed files with 25 additions and 13 deletions
|
@ -133,15 +133,13 @@ string CPPCompile::LocalName(const ID* l) const { return Canonicalize(trim_name(
|
|||
|
||||
string CPPCompile::CaptureName(const ID* c) const {
|
||||
// We want to strip both the module and any inlining appendage.
|
||||
auto n = Canonicalize(trim_name(c).c_str());
|
||||
auto tn = trim_name(c);
|
||||
|
||||
auto appendage = n.find(".");
|
||||
if ( appendage != string::npos ) {
|
||||
n.erase(n.begin() + appendage, n.end());
|
||||
n.push_back('_');
|
||||
}
|
||||
auto appendage = tn.find(".");
|
||||
if ( appendage != string::npos )
|
||||
tn.erase(tn.begin() + appendage, tn.end());
|
||||
|
||||
return n;
|
||||
return Canonicalize(tn.c_str());
|
||||
}
|
||||
|
||||
string CPPCompile::Canonicalize(const char* name) const {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
#! /bin/sh
|
||||
|
||||
find ../testing/btest -type f |
|
||||
grep -E -v 'Baseline|\.tmp|__load__' |
|
||||
grep -E '\.(zeek|test)$' |
|
||||
sort |
|
||||
xargs grep -E -l '@TEST' |
|
||||
xargs grep -E -l '^[ ]*(event|print)' |
|
||||
xargs grep -E -c 'REQUIRES.*CPP.*((!=.*1)|(==.*0))' |
|
||||
grep ':0$' |
|
||||
sed 's,:0,,'
|
||||
sed 's,:0,,' |
|
||||
sort
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue