[clang] [CLANG-CL] Remove the 'static' specifier for _FUNCTION_ in MSVC mode. (PR #128184)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 5 04:25:06 PST 2025


================
@@ -747,8 +747,10 @@ std::string PredefinedExpr::ComputeName(PredefinedIdentKind IK,
     if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD)) {
       if (MD->isVirtual() && IK != PredefinedIdentKind::PrettyFunctionNoVirtual)
         Out << "virtual ";
-      if (MD->isStatic())
-        Out << "static ";
+      if (MD->isStatic()) {
+        if (!ForceElaboratedPrinting)
+          Out << "static ";
+      }
----------------
AaronBallman wrote:

```suggestion
      if (MD->isStatic() && !ForceElaboratedPrinting)
        Out << "static ";
```

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


More information about the cfe-commits mailing list