[clang] [flang] [flang][Frontend] Implement printing defined macros via -dM (PR #87627)

Peter Klausler via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 9 09:52:55 PDT 2024


================
@@ -49,15 +51,21 @@ class Definition {
 
   TokenSequence Apply(const std::vector<TokenSequence> &args, Prescanner &);
 
+  void Print(llvm::raw_ostream &out, llvm::StringRef macroName = "") const;
+
 private:
   static TokenSequence Tokenize(const std::vector<std::string> &argNames,
       const TokenSequence &token, std::size_t firstToken, std::size_t tokens);
+  // For a given token, return the index of the argument to which the token
+  // corresponds, or `argumentCount` if the token does not correspond to any
+  // argument.
+  std::size_t getArgumentIndex(const CharBlock &token) const;
----------------
klausler wrote:

Capitalize function and member function names for consistency in the parser, please.

https://github.com/llvm/llvm-project/pull/87627


More information about the cfe-commits mailing list