diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2023-08-31 13:44:31 -0700 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2023-09-05 13:23:53 -0700 |
commit | 5746002ebb9c3d02be408edf13c2edc39aecf591 (patch) | |
tree | ba7475fabaf14d59464135814c4c4af863ff70b3 /clang-tools-extra/clangd/CodeComplete.cpp | |
parent | b0cbf3a0dac51d426dd38c307f745e74f409aed7 (diff) | |
download | llvm-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.cpp | 6 |
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); |