]> granicus.if.org Git - clang/commitdiff
Thread safety: move the inline function back into a namespace
authorReid Kleckner <reid@kleckner.net>
Wed, 9 Apr 2014 22:17:06 +0000 (22:17 +0000)
committerReid Kleckner <reid@kleckner.net>
Wed, 9 Apr 2014 22:17:06 +0000 (22:17 +0000)
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

include/clang/Analysis/Analyses/ThreadSafetyTIL.h

index 05eb21ebafd35f1fcb52f3075266af84237110db..506adb104e78e30366e6834bd55d2a2ed9be03b6 100644 (file)
@@ -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;