projects
/
satcheck.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c082834
)
add default MC-names for not-found variables in equality test
author
Patrick Lam
<prof.lam@gmail.com>
Mon, 5 Oct 2015 21:23:52 +0000
(23:23 +0200)
committer
Patrick Lam
<prof.lam@gmail.com>
Mon, 5 Oct 2015 21:23:52 +0000
(23:23 +0200)
clang/src/add_mc2_annotations.cpp
patch
|
blob
|
history
diff --git
a/clang/src/add_mc2_annotations.cpp
b/clang/src/add_mc2_annotations.cpp
index 07246f9cc99f3beaaef2ede15b25649d4f8e2f0a..740a710ca8f965355f74831d536d49b3cc873097 100644
(file)
--- a/
clang/src/add_mc2_annotations.cpp
+++ b/
clang/src/add_mc2_annotations.cpp
@@
-953,8
+953,15
@@
public:
DeclRefExpr * l = dyn_cast<DeclRefExpr>(lhs), *r = dyn_cast<DeclRefExpr>(rhs);
is_equality = true;
prel << "\nMCID " << condVarEncoded.str() << ";\n";
DeclRefExpr * l = dyn_cast<DeclRefExpr>(lhs), *r = dyn_cast<DeclRefExpr>(rhs);
is_equality = true;
prel << "\nMCID " << condVarEncoded.str() << ";\n";
- std::string ld = DeclToMCVar.find(l->getDecl())->second,
+ std::string ld, rd;
+ if (DeclToMCVar.find(l->getDecl()) != DeclToMCVar.end())
+ ld = DeclToMCVar.find(l->getDecl())->second;
+ else
+ ld = encode(l->getDecl()->getName());
+ if (DeclToMCVar.find(r->getDecl()) != DeclToMCVar.end())
rd = DeclToMCVar.find(r->getDecl())->second;
rd = DeclToMCVar.find(r->getDecl())->second;
+ else
+ rd = encode(r->getDecl()->getName());
prel << "\nint " << condVar << " = MC2_equals(" <<
ld << ", (uint64_t)" << l->getNameInfo().getName().getAsString() << ", " <<
prel << "\nint " << condVar << " = MC2_equals(" <<
ld << ", (uint64_t)" << l->getNameInfo().getName().getAsString() << ", " <<