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:
Kadir Cetinkaya 2019-10-25 14:15:48 +02:00
parent 11ce19d211
commit ce1e249a68
No known key found for this signature in database
GPG Key ID: E39E36B8D2057ED6
1 changed files with 1 additions and 1 deletions

View File

@ -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);