forked from OSchip/llvm-project
Fix compilation error in clangd/refactor/tweaks/ExpandAutoType.cpp
Summary: During the compilation of the `clangd/refactor/tweaks/ExpandAutoType.cpp`, MSVC returns the following error: llvm-monorepo\llvm\tools\clang\tools\extra\clangd\refactor\tweaks\ExpandAutoType.cpp(85): error C2146: syntax error: missing ')' before identifier 'and' llvm-monorepo\llvm\tools\clang\tools\extra\clangd\refactor\tweaks\ExpandAutoType.cpp(85): error C2065: 'and': undeclared identifier llvm-monorepo\llvm\tools\clang\tools\extra\clangd\refactor\tweaks\ExpandAutoType.cpp(86): error C2143: syntax error: missing ';' before '<template-id>' llvm-monorepo\llvm\tools\clang\tools\extra\clangd\refactor\tweaks\ExpandAutoType.cpp(73): fatal error C1075: '{': no matching token found So, && must be used instead of `and`. Patch By Pavel Samolysov (@psamolysov) ! Reviewers: kadircet Reviewed By: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D69427
This commit is contained in:
parent
11ce19d211
commit
ce1e249a68
|
@ -82,7 +82,7 @@ Expected<Tweak::Effect> ExpandAutoType::apply(const Selection& Inputs) {
|
|||
}
|
||||
|
||||
// if it's a lambda expression, return an error message
|
||||
if (isa<RecordType>(*DeducedType) and
|
||||
if (isa<RecordType>(*DeducedType) &&
|
||||
dyn_cast<RecordType>(*DeducedType)->getDecl()->isLambda()) {
|
||||
return createErrorMessage("Could not expand type of lambda expression",
|
||||
Inputs);
|
||||
|
|
Loading…
Reference in New Issue