From: Reid Kleckner Date: Wed, 9 Apr 2014 22:17:06 +0000 (+0000) Subject: Thread safety: move the inline function back into a namespace X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40901256e6d036e4388744e7192c9d34ea0e4b26;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205935 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/Analyses/ThreadSafetyTIL.h b/include/clang/Analysis/Analyses/ThreadSafetyTIL.h index 05eb21ebaf..506adb104e 100644 --- a/include/clang/Analysis/Analyses/ThreadSafetyTIL.h +++ b/include/clang/Analysis/Analyses/ThreadSafetyTIL.h @@ -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;