|
21 | 21 | #include "AST.h" |
22 | 22 | #include "CodeCompletionStrings.h" |
23 | 23 | #include "Compiler.h" |
| 24 | +#include "Config.h" |
24 | 25 | #include "ExpectedTypes.h" |
25 | 26 | #include "Feature.h" |
26 | 27 | #include "FileDistance.h" |
@@ -786,8 +787,8 @@ SpecifiedScope getQueryScopes(CodeCompletionContext &CCContext, |
786 | 787 | llvm::StringRef SpelledSpecifier = Lexer::getSourceText( |
787 | 788 | CharSourceRange::getCharRange(SemaSpecifier->getRange()), |
788 | 789 | CCSema.SourceMgr, clang::LangOptions()); |
789 | | - if (SpelledSpecifier.consume_front("::")) |
790 | | - Scopes.QueryScopes = {""}; |
| 790 | + if (SpelledSpecifier.consume_front("::")) |
| 791 | + Scopes.QueryScopes = {""}; |
791 | 792 | Scopes.UnresolvedQualifier = std::string(SpelledSpecifier); |
792 | 793 | // Sema excludes the trailing "::". |
793 | 794 | if (!Scopes.UnresolvedQualifier->empty()) |
@@ -1580,7 +1581,7 @@ class CodeCompleteFlow { |
1580 | 1581 | CompletionPrefix HeuristicPrefix; |
1581 | 1582 | std::optional<FuzzyMatcher> Filter; // Initialized once Sema runs. |
1582 | 1583 | Range ReplacedRange; |
1583 | | - std::vector<std::string> QueryScopes; // Initialized once Sema runs. |
| 1584 | + std::vector<std::string> QueryScopes; // Initialized once Sema runs. |
1584 | 1585 | std::vector<std::string> AccessibleScopes; // Initialized once Sema runs. |
1585 | 1586 | // Initialized once QueryScopes is initialized, if there are scopes. |
1586 | 1587 | std::optional<ScopeDistance> ScopeProximity; |
@@ -1639,7 +1640,9 @@ class CodeCompleteFlow { |
1639 | 1640 | Inserter.emplace( |
1640 | 1641 | SemaCCInput.FileName, SemaCCInput.ParseInput.Contents, Style, |
1641 | 1642 | SemaCCInput.ParseInput.CompileCommand.Directory, |
1642 | | - &Recorder->CCSema->getPreprocessor().getHeaderSearchInfo()); |
| 1643 | + &Recorder->CCSema->getPreprocessor().getHeaderSearchInfo(), |
| 1644 | + Config::current().Style.QuotedHeaders, |
| 1645 | + Config::current().Style.AngledHeaders); |
1643 | 1646 | for (const auto &Inc : Includes.MainFileIncludes) |
1644 | 1647 | Inserter->addExisting(Inc); |
1645 | 1648 |
|
@@ -1722,7 +1725,9 @@ class CodeCompleteFlow { |
1722 | 1725 | auto Style = getFormatStyleForFile(FileName, Content, TFS); |
1723 | 1726 | // This will only insert verbatim headers. |
1724 | 1727 | Inserter.emplace(FileName, Content, Style, |
1725 | | - /*BuildDir=*/"", /*HeaderSearchInfo=*/nullptr); |
| 1728 | + /*BuildDir=*/"", /*HeaderSearchInfo=*/nullptr, |
| 1729 | + Config::current().Style.QuotedHeaders, |
| 1730 | + Config::current().Style.AngledHeaders); |
1726 | 1731 |
|
1727 | 1732 | auto Identifiers = collectIdentifiers(Content, Style); |
1728 | 1733 | std::vector<RawIdentifier> IdentifierResults; |
|
0 commit comments