Skip to content

Commit f225510

Browse files
committed
update
1 parent 9a8d4f9 commit f225510

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

include/klee/Module/Annotation.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ enum class Property {
3535
};
3636

3737
struct Unknown {
38-
explicit Unknown(const std::string &str = "Unknown");
38+
explicit Unknown(std::string str = "Unknown");
3939
virtual ~Unknown();
4040

4141
virtual bool operator==(const Unknown &other) const;
@@ -49,13 +49,13 @@ struct Unknown {
4949
};
5050

5151
struct Deref final : public Unknown {
52-
explicit Deref(const std::string &str = "Deref");
52+
explicit Deref(std::string str = "Deref");
5353

5454
[[nodiscard]] Kind getKind() const override;
5555
};
5656

5757
struct InitNull final : public Unknown {
58-
explicit InitNull(const std::string &str = "InitNull");
58+
explicit InitNull(std::string str = "InitNull");
5959

6060
[[nodiscard]] Kind getKind() const override;
6161
};

lib/Module/Annotation.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <fstream>
66
#include <llvm/Support/raw_ostream.h>
7+
#include <utility>
78

89
#ifdef ENABLE_XML_ANNOTATION
910
#include "pugixml.hpp"
@@ -20,7 +21,7 @@ static inline std::string toLower(const std::string &str) {
2021

2122
namespace Statement {
2223

23-
Unknown::Unknown(const std::string &str) : str(str) { initOffset(); }
24+
Unknown::Unknown(std::string str) : str(std::move(str)) { initOffset(); }
2425

2526
Unknown::~Unknown() = default;
2627

@@ -75,11 +76,11 @@ void Unknown::initOffset() {
7576
}
7677
}
7778

78-
Deref::Deref(const std::string &str) : Unknown(str) {}
79+
Deref::Deref(std::string str) : Unknown(std::move(str)) {}
7980

8081
Kind Deref::getKind() const { return Kind::Deref; }
8182

82-
InitNull::InitNull(const std::string &str) : Unknown(str) {}
83+
InitNull::InitNull(std::string str) : Unknown(std::move(str)) {}
8384

8485
Kind InitNull::getKind() const { return Kind::InitNull; }
8586

@@ -221,6 +222,10 @@ AnnotationsMap parseAnnotationsXml(const pugi::xml_document &annotationsXml,
221222
for (pugi::xml_node keyword : customRule.child("Keywords")) {
222223
std::string name = keyword.attribute("name").value();
223224
std::string isRegex = keyword.attribute("isRegex").value();
225+
if (toLower(isRegex) == "true") {
226+
klee_warning("Annotation: regexp currently not implemented");
227+
continue;
228+
}
224229
std::string value = keyword.attribute("value").value();
225230
std::string type = keyword.attribute("type").value();
226231
std::string pairedTo = keyword.attribute("pairedTo").value();

0 commit comments

Comments
 (0)