Skip to content

Conversation

@fmayer
Copy link
Contributor

@fmayer fmayer commented Dec 6, 2025

This happened to work because we were missing both a namespace close and
open and things happened to be included in the correct order.

Created using spr 1.3.7
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html labels Dec 6, 2025
@fmayer fmayer requested a review from jvoung December 6, 2025 00:34
@llvmbot
Copy link
Member

llvmbot commented Dec 6, 2025

@llvm/pr-subscribers-clang

Author: Florian Mayer (fmayer)

Changes

This happened to work because we were missing both a namespace close and
open and things happened to be included in the correct order.


Full diff: https://github.com/llvm/llvm-project/pull/170954.diff

1 Files Affected:

  • (modified) clang/unittests/Analysis/FlowSensitive/MockHeaders.cpp (+4)
diff --git a/clang/unittests/Analysis/FlowSensitive/MockHeaders.cpp b/clang/unittests/Analysis/FlowSensitive/MockHeaders.cpp
index 76c7310e16a4f..8ea2015da08df 100644
--- a/clang/unittests/Analysis/FlowSensitive/MockHeaders.cpp
+++ b/clang/unittests/Analysis/FlowSensitive/MockHeaders.cpp
@@ -1358,6 +1358,8 @@ bool operator!=(const Status &lhs, const Status &rhs);
 Status OkStatus();
 Status InvalidArgumentError(const char *);
 
+}  // namespace absl
+
 #endif // STATUS_H
 )cc";
 
@@ -1370,6 +1372,8 @@ constexpr const char StatusOrDefsHeader[] = R"cc(
 #include "std_type_traits.h"
 #include "std_utility.h"
 
+namespace absl {
+
 template <typename T> struct StatusOr;
 
 namespace internal_statusor {

Copy link
Contributor

@jvoung jvoung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

fmayer and others added 6 commits December 8, 2025 11:24
Created using spr 1.3.7

[skip ci]
Created using spr 1.3.7
Created using spr 1.3.7

[skip ci]
Created using spr 1.3.7
Created using spr 1.3.7

[skip ci]
Created using spr 1.3.7
@fmayer fmayer changed the base branch from users/fmayer/spr/main.nfc-flowsensitive-fix-missing-namespace-in-mockheaders to main December 8, 2025 19:32
@fmayer fmayer enabled auto-merge (squash) December 8, 2025 19:33
@fmayer fmayer merged commit 5d53085 into main Dec 8, 2025
12 of 17 checks passed
@fmayer fmayer deleted the users/fmayer/spr/nfc-flowsensitive-fix-missing-namespace-in-mockheaders branch December 8, 2025 20:00
honeygoyal pushed a commit to honeygoyal/llvm-project that referenced this pull request Dec 9, 2025
This happened to work because we were missing both a namespace close and
open and things happened to be included in the correct order.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants