File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1123,7 +1123,9 @@ bool semaCodeComplete(std::unique_ptr<CodeCompleteConsumer> Consumer,
1123
1123
// skip all includes in this case; these completions are really simple.
1124
1124
PreambleBounds PreambleRegion =
1125
1125
ComputePreambleBounds (*CI->getLangOpts (), *ContentsBuffer, 0 );
1126
- bool CompletingInPreamble = PreambleRegion.Size > Input.Offset ;
1126
+ bool CompletingInPreamble = Input.Offset < PreambleRegion.Size ||
1127
+ (!PreambleRegion.PreambleEndsAtStartOfLine &&
1128
+ Input.Offset == PreambleRegion.Size );
1127
1129
if (Input.Patch )
1128
1130
Input.Patch ->apply (*CI);
1129
1131
// NOTE: we must call BeginSourceFile after prepareCompilerInstance. Otherwise
Original file line number Diff line number Diff line change @@ -2573,7 +2573,7 @@ TEST(SignatureHelpTest, ConstructorInitializeFields) {
2573
2573
}
2574
2574
2575
2575
TEST (CompletionTest, IncludedCompletionKinds) {
2576
- Annotations Test (R"cpp( #include "^" )cpp" );
2576
+ Annotations Test (R"cpp( #include "^)cpp" );
2577
2577
auto TU = TestTU::withCode (Test.code ());
2578
2578
TU.AdditionalFiles [" sub/bar.h" ] = " " ;
2579
2579
TU.ExtraArgs .push_back (" -I" + testPath (" sub" ));
You can’t perform that action at this time.
0 commit comments