[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #110188)
Michael Buch via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 27 07:21:43 PDT 2024
================
@@ -109,6 +110,20 @@ static bool IsArtificial(VarDecl const *VD) {
cast<Decl>(VD->getDeclContext())->isImplicit());
}
+static bool usesDebugTransparent(const Decl *D, const CodeGenModule &CGM) {
+ if (!D)
+ return false;
+
+ if (auto *attr = D->getAttr<DebugTransparentAttr>()) {
+ if (CGM.getCodeGenOpts().DwarfVersion == 0) {
+ CGM.getDiags().Report(attr->getLocation(), diag::warn_debug_transparent_ignored);
+ }
----------------
Michael137 wrote:
Nit:
```suggestion
if (CGM.getCodeGenOpts().DwarfVersion == 0)
CGM.getDiags().Report(attr->getLocation(), diag::warn_debug_transparent_ignored);
```
https://github.com/llvm/llvm-project/pull/110188
More information about the cfe-commits
mailing list