[clang] [clang-tools-extra] [clang] AST: fix getAs canonicalization of leaf types (PR #155028)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 22 20:02:12 PDT 2025


================
@@ -2922,8 +2931,31 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
   ///
   /// There are some specializations of this member template listed
   /// immediately following this class.
+  ///
+  /// If you are interested only in the canonical properties of this type,
+  /// consider using getAsCanonical instead, as that is much faster.
----------------
zyn0217 wrote:

I see we're replacing some uses with `getAsXXXX`, so maybe we want to update the comment to avoid confusing:

```cpp
///  ... This scheme will eventually replace the specific getAsXXXX methods above.
```



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


More information about the cfe-commits mailing list