[cfe-dev] Using "unknown" cxx11 attributes to flag declarations

Alexey Samsonov samsonov at google.com
Tue Nov 19 23:47:52 PST 2013


Hi Patrick,

On Tue, Nov 19, 2013 at 9:27 PM, Patrick Gartung <gartung at fnal.gov> wrote:
> Hi,
>
> We are  working on a project to make a large code base thread safe.

Out of curiosity, did you try
ThreadSanitizer<http://clang.llvm.org/docs/ThreadSanitizer.html> on
your code base? It's able to report
data races which are hard to detect statically.

> We have
> several clang static analyzers that we use to identify thread safety
> problems. As we fix these problems we would like to use cxx11 attributes
to
> flag them complete, eg void * foo () -->> [cms::threadsafe] void * foo().
> Initial tests we release 3.3 show that the parse throws a warning and
drops
> the info:
>
> func_checker.cpp:8:4: warning: unknown attribute 'threadsafe' ignored
> [[ cms::threadsafe ]] void bar() {
>
> We would like to store the contents of the unknown attribute and drop
static
> analyzer reports based on it.
>
> Is there support for this in the head version of clang?
>
> Patrick Gartung
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>



-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131120/6a8db89b/attachment.html>


More information about the cfe-dev mailing list