Fwd: r205931 - Switching back from a static namespace-scoped function to a static class-scope function. No functional change, but resolves a warning.
David Blaikie
dblaikie at gmail.com
Wed Apr 9 15:21:25 PDT 2014
[adding back in the commits mailing list that I accidentally dropped]
On Wed, Apr 9, 2014 at 2:40 PM, Aaron Ballman <aaron at aaronballman.com> wrote:
> Author: aaronballman
> Date: Wed Apr 9 16:40:14 2014
> New Revision: 205931
>
> URL: http://llvm.org/viewvc/llvm-project?rev=205931&view=rev
> Log:
> Switching back from a static namespace-scoped function to a static class-scope function. No functional change, but resolves a warning.
Just marking the function as inline instead of static would be the
right fix. Having classes-as-namespaces isn't really great...
> 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=205931&r1=205930&r2=205931&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h (original)
> +++ cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h Wed Apr 9 16:40:14 2014
> @@ -264,12 +264,12 @@ private:
>
>
> // Contains various helper functions for SExprs.
> -namespace ThreadSafetyTIL {
> -static bool isTrivial(SExpr *E) {
> - unsigned Op = E->opcode();
> - return Op == COP_Variable || Op == COP_Literal || Op == COP_LiteralPtr;
> -}
> -}
> +struct ThreadSafetyTIL {
> + static bool isTrivial(SExpr *E) {
> + unsigned Op = E->opcode();
> + return Op == COP_Variable || Op == COP_Literal || Op == COP_LiteralPtr;
> + }
> +};
>
> class Function;
> class SFunction;
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list