Author: Rahul Joshi
Date: 2025-05-13T06:02:48-07:00
New Revision: 726d2cf01402e8da9b271008dd10106da45d16ac

URL: 
https://github.com/llvm/llvm-project/commit/726d2cf01402e8da9b271008dd10106da45d16ac
DIFF: 
https://github.com/llvm/llvm-project/commit/726d2cf01402e8da9b271008dd10106da45d16ac.diff

LOG: [NFC][Clang] Adopt `TrailingObjects` convenience API in MacroArgs (#139635)

Adopt convenience API for single trailing type added in
https://github.com/llvm/llvm-project/pull/138970.

Added: 
    

Modified: 
    clang/lib/Lex/MacroArgs.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Lex/MacroArgs.cpp b/clang/lib/Lex/MacroArgs.cpp
index 2f97d9e02bc11..548df16c59f6b 100644
--- a/clang/lib/Lex/MacroArgs.cpp
+++ b/clang/lib/Lex/MacroArgs.cpp
@@ -66,7 +66,7 @@ MacroArgs *MacroArgs::create(const MacroInfo *MI,
                   "uninitialized array (as opposed to reusing a cached "
                   "MacroArgs)");
     std::copy(UnexpArgTokens.begin(), UnexpArgTokens.end(),
-              Result->getTrailingObjects<Token>());
+              Result->getTrailingObjects());
   }
 
   return Result;
@@ -119,7 +119,7 @@ const Token *MacroArgs::getUnexpArgument(unsigned Arg) 
const {
   assert(Arg < getNumMacroArguments() && "Invalid arg #");
   // The unexpanded argument tokens start immediately after the MacroArgs 
object
   // in memory.
-  const Token *Start = getTrailingObjects<Token>();
+  const Token *Start = getTrailingObjects();
   const Token *Result = Start;
 
   // Scan to find Arg.


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to