diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-05-10 16:31:55 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-05-10 16:31:55 +0000 |
commit | f3ca2698393c564450b749a9fc9152a0e70d0c08 (patch) | |
tree | 4fd6e5cd83937148285873a5af052c957b3c939b /clang/lib/Sema/SemaCodeComplete.cpp | |
parent | 55b3e22927a7e3e811b3c7f0304146f598f72987 (diff) | |
download | llvm-f3ca2698393c564450b749a9fc9152a0e70d0c08.zip llvm-f3ca2698393c564450b749a9fc9152a0e70d0c08.tar.gz llvm-f3ca2698393c564450b749a9fc9152a0e70d0c08.tar.bz2 |
Decouple ExprCXX.h and DeclCXX.h and clean up includes a bit.
Required pulling LambdaExpr::Capture into its own header.
No functionality change.
llvm-svn: 208470
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCodeComplete.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index 4b23c37..7e34b64 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/lib/Sema/SemaCodeComplete.cpp @@ -4327,15 +4327,13 @@ void Sema::CodeCompleteLambdaIntroducer(Scope *S, LambdaIntroducer &Intro, // Note what has already been captured. llvm::SmallPtrSet<IdentifierInfo *, 4> Known; bool IncludedThis = false; - for (SmallVectorImpl<LambdaCapture>::iterator C = Intro.Captures.begin(), - CEnd = Intro.Captures.end(); - C != CEnd; ++C) { - if (C->Kind == LCK_This) { + for (const auto &C : Intro.Captures) { + if (C.Kind == LCK_This) { IncludedThis = true; continue; } - Known.insert(C->Id); + Known.insert(C.Id); } // Look for other capturable variables. |