r209913 - Thread Safety Analysis: fix handling of string and char literals.
DeLesley Hutchins
delesley at google.com
Fri May 30 11:20:04 PDT 2014
Author: delesley
Date: Fri May 30 13:20:04 2014
New Revision: 209913
URL: http://llvm.org/viewvc/llvm-project?rev=209913&view=rev
Log:
Thread Safety Analysis: fix handling of string and char literals.
Modified:
cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h
cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h
Modified: cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h?rev=209913&r1=209912&r2=209913&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h (original)
+++ cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h Fri May 30 13:20:04 2014
@@ -237,7 +237,7 @@ inline ValueType ValueType::getValueType
template<>
inline ValueType ValueType::getValueType<StringRef>() {
- return ValueType(BT_Pointer, getSizeType(sizeof(StringRef)), false, 0);
+ return ValueType(BT_String, getSizeType(sizeof(StringRef)), false, 0);
}
template<>
Modified: cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h?rev=209913&r1=209912&r2=209913&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h (original)
+++ cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h Fri May 30 13:20:04 2014
@@ -599,6 +599,10 @@ protected:
SS << E->value();
}
+ void printLiteralT(LiteralT<uint8_t> *E, StreamType &SS) {
+ SS << "'" << E->value() << "'";
+ }
+
void printLiteral(Literal *E, StreamType &SS) {
if (E->clangExpr()) {
SS << getSourceLiteralString(E->clangExpr());
More information about the cfe-commits
mailing list