r205935 - Thread safety: move the inline function back into a namespace
Reid Kleckner
reid at kleckner.net
Wed Apr 9 15:17:06 PDT 2014
Author: rnk
Date: Wed Apr 9 17:17:06 2014
New Revision: 205935
URL: http://llvm.org/viewvc/llvm-project?rev=205935&view=rev
Log:
Thread safety: move the inline function back into a namespace
Moving it into a struct makes things work because it implicitly marks
the function as inline. The struct is unnecessary if you explicitly
mark the function inline.
Modified:
cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.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=205935&r1=205934&r2=205935&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h (original)
+++ cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h Wed Apr 9 17:17:06 2014
@@ -264,12 +264,12 @@ private:
// Contains various helper functions for SExprs.
-struct ThreadSafetyTIL {
- static bool isTrivial(SExpr *E) {
+namespace ThreadSafetyTIL {
+ inline bool isTrivial(SExpr *E) {
unsigned Op = E->opcode();
return Op == COP_Variable || Op == COP_Literal || Op == COP_LiteralPtr;
}
-};
+}
class Function;
class SFunction;
More information about the cfe-commits
mailing list