[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 18 11:48:39 PDT 2024
================
@@ -1022,7 +1039,13 @@ void DeclPrinter::VisitVarDecl(VarDecl *D) {
? D->getIdentifier()->deuglifiedName()
: D->getName();
- printDeclType(T, Name);
+ if (!Policy.SuppressTagKeyword && Policy.SuppressScope &&
+ !Policy.SuppressUnwrittenScope) {
+ MaybePrintTagKeywordIfSupressingScopes(Policy, T, Out);
+ printDeclType(T, Name);
+ } else {
+ printDeclType(T, Name);
+ }
----------------
AaronBallman wrote:
```suggestion
if (!Policy.SuppressTagKeyword && Policy.SuppressScope &&
!Policy.SuppressUnwrittenScope)
MaybePrintTagKeywordIfSupressingScopes(Policy, T, Out);
printDeclType(T, Name);
```
https://github.com/llvm/llvm-project/pull/84014
More information about the cfe-commits
mailing list