psamolysov created this revision.
psamolysov added projects: clang, clang-tools-extra.
Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, 
MaskRay, ilya-biryukov.

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`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69427

Files:
  clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp


Index: clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
===================================================================
--- clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
+++ clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
@@ -82,7 +82,7 @@
   }
 
   // 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);


Index: clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
===================================================================
--- clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
+++ clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
@@ -82,7 +82,7 @@
   }
 
   // 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);
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to