aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clangd/CodeComplete.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2023-08-31 13:44:31 -0700
committerJan Svoboda <jan_svoboda@apple.com>2023-09-05 13:23:53 -0700
commit5746002ebb9c3d02be408edf13c2edc39aecf591 (patch)
treeba7475fabaf14d59464135814c4c4af863ff70b3 /clang-tools-extra/clangd/CodeComplete.cpp
parentb0cbf3a0dac51d426dd38c307f745e74f409aed7 (diff)
downloadllvm-5746002ebb9c3d02be408edf13c2edc39aecf591.zip
llvm-5746002ebb9c3d02be408edf13c2edc39aecf591.tar.gz
llvm-5746002ebb9c3d02be408edf13c2edc39aecf591.tar.bz2
[clang] NFCI: Change returned LanguageOptions pointer to reference
Diffstat (limited to 'clang-tools-extra/clangd/CodeComplete.cpp')
-rw-r--r--clang-tools-extra/clangd/CodeComplete.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp
index 1a0023d..70c4d7e 100644
--- a/clang-tools-extra/clangd/CodeComplete.cpp
+++ b/clang-tools-extra/clangd/CodeComplete.cpp
@@ -1356,11 +1356,11 @@ bool semaCodeComplete(std::unique_ptr<CodeCompleteConsumer> Consumer,
auto &FrontendOpts = CI->getFrontendOpts();
FrontendOpts.SkipFunctionBodies = true;
// Disable typo correction in Sema.
- CI->getLangOpts()->SpellChecking = false;
+ CI->getLangOpts().SpellChecking = false;
// Code completion won't trigger in delayed template bodies.
// This is on-by-default in windows to allow parsing SDK headers; we're only
// disabling it for the main-file (not preamble).
- CI->getLangOpts()->DelayedTemplateParsing = false;
+ CI->getLangOpts().DelayedTemplateParsing = false;
// Setup code completion.
FrontendOpts.CodeCompleteOpts = Options;
FrontendOpts.CodeCompletionAt.FileName = std::string(Input.FileName);
@@ -1380,7 +1380,7 @@ bool semaCodeComplete(std::unique_ptr<CodeCompleteConsumer> Consumer,
// overriding the preamble will break sema completion. Fortunately we can just
// skip all includes in this case; these completions are really simple.
PreambleBounds PreambleRegion =
- ComputePreambleBounds(*CI->getLangOpts(), *ContentsBuffer, 0);
+ ComputePreambleBounds(CI->getLangOpts(), *ContentsBuffer, 0);
bool CompletingInPreamble = Input.Offset < PreambleRegion.Size ||
(!PreambleRegion.PreambleEndsAtStartOfLine &&
Input.Offset == PreambleRegion.Size);