[llvm-branch-commits] [clang] 02129ea - [Syntax] avoid using c++17 features on 15.x branch

Sam McCall via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Oct 10 08:08:30 PDT 2022


Author: Sam McCall
Date: 2022-10-10T17:08:10+02:00
New Revision: 02129eab7d58362ad5d187c73aff255710578e75

URL: https://github.com/llvm/llvm-project/commit/02129eab7d58362ad5d187c73aff255710578e75
DIFF: https://github.com/llvm/llvm-project/commit/02129eab7d58362ad5d187c73aff255710578e75.diff

LOG: [Syntax] avoid using c++17 features on 15.x branch

Added: 
    

Modified: 
    clang/lib/Tooling/Syntax/Tokens.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Tooling/Syntax/Tokens.cpp b/clang/lib/Tooling/Syntax/Tokens.cpp
index 9a30e3692ee54..1fa73c667b7f2 100644
--- a/clang/lib/Tooling/Syntax/Tokens.cpp
+++ b/clang/lib/Tooling/Syntax/Tokens.cpp
@@ -460,8 +460,10 @@ TokenBuffer::spelledForExpanded(llvm::ArrayRef<syntax::Token> Expanded) const {
     return llvm::None;
   const syntax::Token *First = &Expanded.front();
   const syntax::Token *Last = &Expanded.back();
-  auto [FirstSpelled, FirstMapping] = spelledForExpandedToken(First);
-  auto [LastSpelled, LastMapping] = spelledForExpandedToken(Last);
+  const syntax::Token *FirstSpelled, *LastSpelled;
+  const TokenBuffer::Mapping *FirstMapping, *LastMapping;
+  std::tie(FirstSpelled, FirstMapping) = spelledForExpandedToken(First);
+  std::tie(LastSpelled, LastMapping) = spelledForExpandedToken(Last);
 
   FileID FID = SourceMgr->getFileID(FirstSpelled->location());
   // FIXME: Handle multi-file changes by trying to map onto a common root.


        


More information about the llvm-branch-commits mailing list