[clang] [clang-tools-extra] [clang] Retain unrecognized C++ [[attributes]] in the AST (PR #209224)

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 21 23:53:57 PDT 2026


vgvassilev wrote:

> The only I problematic bit I can see about these attributes in templated declarations is if they have arguments, we don't know if they are types or expressions and so would need instantiation.

Clang won't do any semantic analysis on the attribute content. The `UnknownAttr` is detected and the token sequence is recorded, nothing else. The tools/plugins can decide what to do and if the content is a type and eventually instantiate something but all of this is outside clang.

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


More information about the cfe-commits mailing list