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 | 03fbe3ef81e75bcbc8a54a301bd617faee93b40b (patch) | |
tree | b69132332cd0083b5c78de395ceacf16c856b122 /clang/lib/ARCMigrate/Internals.h | |
parent | aa1ce901ebfbc1bfa58705f2660a8693f9c21296 (diff) | |
download | bcm5719-llvm-03fbe3ef81e75bcbc8a54a301bd617faee93b40b.tar.gz bcm5719-llvm-03fbe3ef81e75bcbc8a54a301bd617faee93b40b.zip |
[arcmt] Adds brackets in case statements that "contain" initialization of retaining
variable, thus emitting the "switch case is in protected scope" error.
rdar://12952016
llvm-svn: 171484
Diffstat (limited to 'clang/lib/ARCMigrate/Internals.h')
-rw-r--r-- | clang/lib/ARCMigrate/Internals.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/ARCMigrate/Internals.h b/clang/lib/ARCMigrate/Internals.h index 1966a9823b9..fac0d23528f 100644 --- a/clang/lib/ARCMigrate/Internals.h +++ b/clang/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; } |