http://codereview.appspot.com/4959053/diff/1/lib/Sema/AnalysisBasedWarnings.cpp File lib/Sema/AnalysisBasedWarnings.cpp (right): http://codereview.appspot.com/4959053/diff/1/lib/Sema/AnalysisBasedWarnings.cpp#newcode1333 lib/Sema/AnalysisBasedWarnings.cpp:1333: // FIXME: follow the decl chain for enclosing contexts ...
13 years, 5 months ago
(2011-09-02 06:45:58 UTC)
#1
http://codereview.appspot.com/4959053/diff/1/lib/Sema/AnalysisBasedWarnings.cpp
File lib/Sema/AnalysisBasedWarnings.cpp (right):
http://codereview.appspot.com/4959053/diff/1/lib/Sema/AnalysisBasedWarnings.c...
lib/Sema/AnalysisBasedWarnings.cpp:1333: // FIXME: follow the decl chain for
enclosing contexts to identify any
What decl chain? We don't support nested functions.
Are you imagining constructs such as this?
void f() __attribute__((no_thread_safety_analysis));
void f() {
struct S {
void m() {
// do something unsafe
}
};
// ...
}
If so, I would gladly not support that. Force the programmer to annotate each
function explicitly.
http://codereview.appspot.com/4959053/diff/1/lib/Sema/AnalysisBasedWarnings.cpp File lib/Sema/AnalysisBasedWarnings.cpp (right): http://codereview.appspot.com/4959053/diff/1/lib/Sema/AnalysisBasedWarnings.cpp#newcode1333 lib/Sema/AnalysisBasedWarnings.cpp:1333: // FIXME: follow the decl chain for enclosing contexts ...
13 years, 5 months ago
(2011-09-02 22:25:09 UTC)
#2
http://codereview.appspot.com/4959053/diff/1/lib/Sema/AnalysisBasedWarnings.cpp
File lib/Sema/AnalysisBasedWarnings.cpp (right):
http://codereview.appspot.com/4959053/diff/1/lib/Sema/AnalysisBasedWarnings.c...
lib/Sema/AnalysisBasedWarnings.cpp:1333: // FIXME: follow the decl chain for
enclosing contexts to identify any
On 2011/09/02 06:45:58, chandlerc wrote:
> What decl chain? We don't support nested functions.
>
> Are you imagining constructs such as this?
>
> void f() __attribute__((no_thread_safety_analysis));
> void f() {
> struct S {
> void m() {
> // do something unsafe
> }
> };
> // ...
> }
>
> If so, I would gladly not support that. Force the programmer to annotate each
> function explicitly.
>
Ok, sounds good. FIXME removed.
Issue 4959053: Thread safety: No thread safety analysis option
Created 13 years, 5 months ago by supertri
Modified 13 years, 5 months ago
Reviewers: chandlerc
Base URL:
Comments: 2