Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(810)

Issue 4973067: Moving analysis to separate file

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 3 months ago by supertri
Modified:
13 years, 3 months ago
Visibility:
Public.

Patch Set 1 #

Total comments: 7

Patch Set 2 : A few small refactorings #

Unified diffs Side-by-side diffs Delta from patch set Stats (+957 lines, -791 lines) Patch
A include/clang/Analysis/Analyses/ThreadSafety.h View 1 1 chunk +71 lines, -0 lines 0 comments Download
M include/clang/Basic/DiagnosticSemaKinds.td View 2 chunks +1 line, -7 lines 0 comments Download
M lib/Analysis/CMakeLists.txt View 1 chunk +1 line, -0 lines 0 comments Download
A lib/Analysis/ThreadSafety.cpp View 1 1 chunk +794 lines, -0 lines 0 comments Download
M lib/Sema/AnalysisBasedWarnings.cpp View 1 4 chunks +81 lines, -775 lines 0 comments Download
M test/SemaCXX/warn-thread-safety-analysis.cpp View 3 chunks +9 lines, -9 lines 0 comments Download

Messages

Total messages: 1
supertri
13 years, 3 months ago (2011-09-07 15:51:45 UTC) #1
http://codereview.appspot.com/4973067/diff/1/include/clang/Analysis/Analyses/...
File include/clang/Analysis/Analyses/ThreadSafety.h (right):

http://codereview.appspot.com/4973067/diff/1/include/clang/Analysis/Analyses/...
include/clang/Analysis/Analyses/ThreadSafety.h:28:
//===----------------------------------------------------------------------===//
Will delete this banner comment, and the extra spaces above it.

http://codereview.appspot.com/4973067/diff/1/include/clang/Analysis/Analyses/...
include/clang/Analysis/Analyses/ThreadSafety.h:35: enum VariableAccessKind {
This needs a new name. Basically, this enum is for things which are protected by
locks. Maybe the enum could be "ProtectedOperationKind" with
VariableDereference, VariableAccess, and FunctionCall as options. Thoughts?

http://codereview.appspot.com/4973067/diff/1/lib/Analysis/ThreadSafety.cpp
File lib/Analysis/ThreadSafety.cpp (right):

http://codereview.appspot.com/4973067/diff/1/lib/Analysis/ThreadSafety.cpp#ne...
lib/Analysis/ThreadSafety.cpp:355: //  switch (AK) {
Whoops! I will delete this accidentally left in comment. 

Note that this method was refactored to use the new getLockKindFromAccessKind
and locksetContainsAtLeast methods, and the new Enum (in place of DiagIDs, which
have been removed from this file).

http://codereview.appspot.com/4973067/diff/1/lib/Analysis/ThreadSafety.cpp#ne...
lib/Analysis/ThreadSafety.cpp:544: warnIfMutexNotHeld(D, Exp, AK_Written, Mutex,
VAK_FunctionCall);
I will see if I can move the construction of the Mutex object into
warnIfMutexNotHeld.

http://codereview.appspot.com/4973067/diff/1/lib/Analysis/ThreadSafety.cpp#ne...
lib/Analysis/ThreadSafety.cpp:752: LocksetFactory);
Over 80 characters.

http://codereview.appspot.com/4973067/diff/1/lib/Sema/AnalysisBasedWarnings.cpp
File lib/Sema/AnalysisBasedWarnings.cpp (right):

http://codereview.appspot.com/4973067/diff/1/lib/Sema/AnalysisBasedWarnings.c...
lib/Sema/AnalysisBasedWarnings.cpp:39: #include "llvm/ADT/PostOrderIterator.h"
I need to delete a couple include statements.

http://codereview.appspot.com/4973067/diff/1/lib/Sema/AnalysisBasedWarnings.c...
lib/Sema/AnalysisBasedWarnings.cpp:878: Reporter.emitDiagnostics();
Right now I batch up all warnings and output sorted by source location since I
need to do that anyway for a subset of the warnings. I could have some warnings
output as they appear, and some at the end sorted by source location, but it
seems a bit cleaner to have them all output together. Thoughts on this?
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b