[clang] [clang-tools-extra] [clang][lex] Always pass suggested module to `InclusionDirective()` callback (PR #81061)

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 8 09:51:08 PST 2024


================
@@ -127,8 +127,12 @@ class PPCallbacks {
   /// \param RelativePath The path relative to SearchPath, at which the include
   /// file was found. This is equal to FileName except for framework includes.
   ///
-  /// \param Imported The module, whenever an inclusion directive was
-  /// automatically turned into a module import or null otherwise.
+  /// \param SuggestedModule The module, whenever an inclusion directive was
+  /// considered to be automatically turned into a module import, or null
----------------
benlangmuir wrote:

"was considered to be" most commonly it means you are describing the result of a consideration -- "Clang is considered to be a good compiler" -- rather than simply saying that something was considered but without reflecting the final judgment.  It's ambiguous here.

Suggestion: "The module suggested for this header, if any. See \p ModuleImported for whether this include was translated into a module imported"

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


More information about the cfe-commits mailing list