diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-01-04 18:30:08 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-01-04 18:30:08 +0000 |
commit | ea2224d7078c4d31ad32adbaba4bdc2d85a3d609 (patch) | |
tree | b5e3be08d7fbef2ec0fb2998fdf1e214edf6282d /lib/ARCMigrate/Internals.h | |
parent | 81cc2f1ecd31d8e3bca2c936fb9538a9d9c39695 (diff) |
[arcmt] Adds brackets in case statements that "contain" initialization of retaining
variable, thus emitting the "switch case is in protected scope" error.
rdar://12952016
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171484 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ARCMigrate/Internals.h')
-rw-r--r-- | lib/ARCMigrate/Internals.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ARCMigrate/Internals.h b/lib/ARCMigrate/Internals.h index 1966a9823b..fac0d23528 100644 --- a/lib/ARCMigrate/Internals.h +++ b/lib/ARCMigrate/Internals.h @@ -146,16 +146,20 @@ public: MigratorOptions MigOptions; Sema &SemaRef; TransformActions &TA; + const CapturedDiagList &CapturedDiags; std::vector<SourceLocation> &ARCMTMacroLocs; llvm::Optional<bool> EnableCFBridgeFns; MigrationPass(ASTContext &Ctx, LangOptions::GCMode OrigGCMode, Sema &sema, TransformActions &TA, + const CapturedDiagList &capturedDiags, std::vector<SourceLocation> &ARCMTMacroLocs) : Ctx(Ctx), OrigGCMode(OrigGCMode), MigOptions(), - SemaRef(sema), TA(TA), + SemaRef(sema), TA(TA), CapturedDiags(capturedDiags), ARCMTMacroLocs(ARCMTMacroLocs) { } + const CapturedDiagList &getDiags() const { return CapturedDiags; } + bool isGCMigration() const { return OrigGCMode != LangOptions::NonGC; } bool noNSAllocReallocError() const { return MigOptions.NoNSAllocReallocError; } void setNSAllocReallocError(bool val) { MigOptions.NoNSAllocReallocError = val; } |