llvm-project/clang/lib/Analysis
Aaron Puchert 6de19ea4b6 Thread safety analysis: Drop special block handling
Previous changes like D101202 and D104261 have eliminated the special
status that break and continue once had, since now we're making
decisions purely based on the structure of the CFG without regard for
the underlying source code constructs.

This means we don't gain anything from defering handling for these
blocks. Dropping it moves some diagnostics, though arguably into a
better place. We're working around a "quirk" in the CFG that perhaps
wasn't visible before: while loops have an empty "transition block"
where continue statements and the regular loop exit meet, before
continuing to the loop entry. To get a source location for that, we
slightly extend our handling for empty blocks. The source location for
the transition ends up to be the loop entry then, but formally this
isn't a back edge. We pretend it is anyway. (This is safe: we can always
treat edges as back edges, it just means we allow less and don't modify
the lock set. The other way around it wouldn't be safe.)

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D106715
2021-09-20 15:20:15 +02:00
..
plugins [analyzer][NFC] Change LangOptions to CheckerManager in the shouldRegister* functions 2020-03-27 14:34:09 +01:00
AnalysisDeclContext.cpp [analyzer][NFC] Display the correct function name even in crash dumps 2021-07-12 09:06:46 +02:00
BodyFarm.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
CFG.cpp [analyzer] Correctly propagate ConstructionContextLayer thru ParenExpr 2021-05-24 10:16:52 +02:00
CFGReachabilityAnalysis.cpp
CFGStmtMap.cpp
CMakeLists.txt [analyzer] Introduce MacroExpansionContext to libAnalysis 2021-02-22 11:11:57 +01:00
CallGraph.cpp [[Clang CallGraph]] CallGraph should still record calls to decls. 2020-03-20 08:55:23 -07:00
CalledOnceCheck.cpp [clang] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
CloneDetection.cpp Avoid SourceManager.h include in RawCommentList.h, add missing incs 2020-02-27 13:49:40 -08:00
CocoaConventions.cpp
CodeInjector.cpp
ConstructionContext.cpp
Consumed.cpp [NFC] Refactor representation of materialized temporaries 2019-11-19 18:20:45 +01:00
Dominators.cpp
ExprMutationAnalyzer.cpp [ASTImporter] Add support for importing GenericSelectionExpr AST nodes. 2020-12-16 15:39:50 -08:00
IssueHash.cpp Revert "Revert "[analyzer] NFC: Move IssueHash to libAnalysis."" 2020-11-17 16:01:49 -08:00
LiveVariables.cpp [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment 2021-02-12 16:19:20 +01:00
MacroExpansionContext.cpp PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23 2021-07-08 13:37:57 -07:00
ObjCNoReturn.cpp
PathDiagnostic.cpp Add type information to integral template argument if required. 2021-05-12 19:00:08 +00:00
PostOrderCFGView.cpp AnalysisDeclContext::ManagedAnalyses: Use unique_ptr to simplify memory management 2020-04-28 22:31:16 -07:00
ProgramPoint.cpp [AST] Remove DeclCXX.h dep on ASTContext.h 2020-04-06 10:09:01 -07:00
ReachableCode.cpp Change while to do-while 2020-06-25 09:30:30 -07:00
RetainSummaryManager.cpp [clang] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
ThreadSafety.cpp Thread safety analysis: Drop special block handling 2021-09-20 15:20:15 +02:00
ThreadSafetyCommon.cpp [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
ThreadSafetyLogical.cpp
ThreadSafetyTIL.cpp
UninitializedValues.cpp [SemaCXX] Fix false positive of -Wuninitialized-const-reference in empty function body. 2020-07-06 10:52:05 -07:00