[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)
Zahira Ammarguellat via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 6 09:01:16 PST 2024
================
@@ -1635,6 +1635,17 @@ void TypePrinter::printElaboratedBefore(const ElaboratedType *T,
if (T->getKeyword() != ElaboratedTypeKeyword::None)
OS << " ";
NestedNameSpecifier *Qualifier = T->getQualifier();
+ if (!Policy.SuppressTagKeyword && Policy.SuppressScope &&
+ !Policy.SuppressUnwrittenScope) {
+ StringRef prefix = T->isClassType() ? "class "
+ : T->isStructureType() ? "struct "
+ : T->isUnionType() ? "union "
+ : "";
+ OS << prefix;
+ Policy.SuppressTagKeyword = true;
+ Policy.SuppressScope = false;
----------------
zahiraam wrote:
Not sure what you mean here "where these changes will fix the test"? will fix which test? The unit test you are referring to is `DeclPrinterTest`? this should be `TestCXXRecordDecl12`.
https://github.com/llvm/llvm-project/pull/84014
More information about the cfe-commits
mailing list