[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 16 00:16:12 PDT 2024


================
@@ -0,0 +1,75 @@
+//===-- ASTOps.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
+//
+//===----------------------------------------------------------------------===//
+//
+//  Operations on AST nodes that are used in flow-sensitive analysis.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_ASTOPS_H
+#define LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_ASTOPS_H
+
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/FlowSensitive/StorageLocation.h"
+#include "llvm/ADT/DenseSet.h"
+#include "llvm/ADT/SetVector.h"
+
+namespace clang {
+namespace dataflow {
+/// Skip past nodes that the CFG does not emit. These nodes are invisible to
----------------
martinboehme wrote:

```suggestion
namespace dataflow {

/// Skip past nodes that the CFG does not emit. These nodes are invisible to
```

This is the usual style in the project. (Otherwise, the namespace looks as if it belongs more closely to the following function than that function belongs to the others.)

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


More information about the cfe-commits mailing list