[clang] [llvm] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

Nick Desaulniers via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 27 13:12:23 PST 2023


================
@@ -455,18 +455,11 @@ void DiagnosticInfoDontCall::print(DiagnosticPrinter &DP) const {
 SmallVector<std::string> DiagnosticInfoDontCall::getInliningDecisions() const {
   SmallVector<std::string> InliningDecisions;
 
-  if (MDN) {
-    const MDOperand &MO = MDN->getOperand(0);
-    if (auto *MDT = dyn_cast<MDTuple>(MO)) {
-      for (const MDOperand &MO : MDT->operands()) {
-        if (auto *S = dyn_cast<MDString>(MO)) {
+  if (MDN)
+    if (auto *MDT = dyn_cast<MDTuple>(MDN->getOperand(0)))
+      for (const MDOperand &MO : MDT->operands())
+        if (auto *S = dyn_cast<MDString>(MO))
           InliningDecisions.push_back(S->getString().str());
-        }
-      }
-    } else if (auto *S = dyn_cast<MDString>(MO)) {
-      InliningDecisions.push_back(S->getString().str());
-    }
-  }
----------------
nickdesaulniers wrote:

yes; note:
1. github is having some kind of outtage currently. https://www.githubstatus.com/ currently mentions an issue with PRs.  I have pushed a revert but it's not yet being reflected in the GH UI.
2. I need to fix the issue pointed out https://reviews.llvm.org/D141451#inline-1446137, which I haven't done yet. The revert was incorrect.

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


More information about the cfe-commits mailing list