[clang] [clang][dataflow] Add support for lambda captures (PR #68558)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 9 00:20:31 PDT 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff c98bf1e45e22e2a7d107b187f5d3e7abf5e81375 85dc5eea1810d5d7af207e211799aa92a0f9f154 -- clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp clang/unittests/Analysis/FlowSensitive/TestingSupport.h clang/unittests/Analysis/FlowSensitive/TransferTest.cpp clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
index d801a54456ea..01c6cc69e2b9 100644
--- a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
+++ b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
@@ -458,7 +458,8 @@ Environment::Environment(DataflowAnalysisContext &DACtx,
} else if (Capture.capturesThis()) {
const auto *SurroundingMethodDecl =
cast<CXXMethodDecl>(DeclCtx.getNonClosureAncestor());
- QualType ThisPointeeType = SurroundingMethodDecl->getFunctionObjectParameterType();
+ QualType ThisPointeeType =
+ SurroundingMethodDecl->getFunctionObjectParameterType();
ThisPointeeLoc =
&cast<RecordValue>(createValue(ThisPointeeType))->getLoc();
}
diff --git a/clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp b/clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp
index 283bad92457f..65c527ae63d2 100644
--- a/clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp
+++ b/clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp
@@ -181,8 +181,7 @@ llvm::Error test::checkDataflowWithNoopAnalysis(
"-std=" +
std::string(LangStandard::getLangStandardForKind(Std).getName())};
AnalysisInputs<NoopAnalysis> AI(
- Code,
- TargetFuncMatcher,
+ Code, TargetFuncMatcher,
[UseBuiltinModel = Options.BuiltinOpts.has_value()](ASTContext &C,
Environment &Env) {
return NoopAnalysis(
``````````
</details>
https://github.com/llvm/llvm-project/pull/68558
More information about the cfe-commits
mailing list