[clang] [clang-tools-extra] [Sema][clangd] add noexcept to override functions during code completion (PR #75937)

Sirui Mu via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 19 17:40:46 PST 2023


Lancern wrote:

> I didn't see anything reflecting this condition; are you still working on this patch?

No, this is not a WIP. I primarily changed the `CodeCompletionResult::createCodeCompletionStringForDecl` function, which is called during code completion to generate the override function declarator based on the `FunctionDecl` of the virtual function in the base. I added 2 calls in that function to a new function `AddFunctionExceptSpecToCompletionString` which appends the `noexcept` specifier to the generating string if the `FunctionDecl` has `noexcept` specifier.

Yes, I'm not explicitly testing if we're overriding a virtual function in the base. I understand the `CodeCompletionResult::createCodeCompletionStringForDecl` function already covers that. Am I patching the wrong place?

https://github.com/llvm/llvm-project/pull/75937


More information about the cfe-commits mailing list