================
@@ -0,0 +1,48 @@
+//===- SSAFAnalysesCommon.h -------------------------------------*- C++ 
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+//  Common code in SSAF analyses implementations
+//
+//===----------------------------------------------------------------------===//
+#ifndef 
LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_ANALYSES_SSAFANALYSESCOMMON_H
+#define 
LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_ANALYSES_SSAFANALYSESCOMMON_H
+
+#include "clang/AST/ASTContext.h"
+#include "clang/AST/Decl.h"
+#include "llvm/Support/JSON.h"
+
+template <typename NodeTy, typename... Ts>
+llvm::Error makeErrAtNode(clang::ASTContext &Ctx, const NodeTy *N,
+                          llvm::StringRef Fmt, const Ts &...Args) {
+  std::string LocStr = N->getBeginLoc().printToString(Ctx.getSourceManager());
+  return llvm::createStringError((Fmt + " at %s").str().c_str(), Args...,
+                                 LocStr.c_str());
+}
----------------
steakhal wrote:

I figured these declarations live within `clang::ssaf`, but they are not 
enclosed in the namespace. Why?

https://github.com/llvm/llvm-project/pull/191932
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to