[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 07:37:26 PDT 2024
================
@@ -679,6 +679,19 @@ static void printExplicitSpecifier(ExplicitSpecifier ES, llvm::raw_ostream &Out,
Out << Proto;
}
+static void AddPrefix(PrintingPolicy &Policy, QualType T,
+ llvm::raw_ostream &Out) {
+ if (!Policy.SuppressTagKeyword && Policy.SuppressScope &&
+ !Policy.SuppressUnwrittenScope) {
+ StringRef prefix;
+ prefix = T->isClassType() ? "class "
+ : T->isStructureType() ? "struct "
+ : T->isUnionType() ? "union "
+ : "";
+ Out << prefix;
----------------
AaronBallman wrote:
```suggestion
StringRef prefix = T->isClassType() ? "class "
: T->isStructureType() ? "struct "
: T->isUnionType() ? "union "
: "";
Out << prefix;
```
And probably needs to be reformatted.
https://github.com/llvm/llvm-project/pull/84014
More information about the cfe-commits
mailing list