Skip to content

Commit ac4b57f

Browse files
committed
Move #include out of namespace
1 parent 41bab25 commit ac4b57f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

clang/test/Analysis/Inputs/system-header-simulator-for-protobuf.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
#pragma clang system_header
77

88
class Arena;
9-
class MessageLite;
9+
class MessageLite {
10+
int SomeArbitraryField;
11+
};
1012

1113
// Originally declared in generated_message_util.h
1214
MessageLite *GetOwnedMessageInternal(Arena *, MessageLite *, Arena *);

clang/test/Analysis/NewDeleteLeaks.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// RUN: unix.DynamicMemoryModeling:AddNoOwnershipChangeNotes=true
1414

1515
#include "Inputs/system-header-simulator-for-malloc.h"
16+
// For the tests in namespace protobuf_leak:
17+
#include "Inputs/system-header-simulator-for-protobuf.h"
1618

1719
//===----------------------------------------------------------------------===//
1820
// Report for which we expect NoOwnershipChangeVisitor to add a new note.
@@ -223,9 +225,6 @@ void caller() {
223225
// protobuf code that passes dynamically allocated memory to a certain function
224226
// named GetOwnedMessageInternal.
225227
namespace protobuf_leak {
226-
#include "Inputs/system-header-simulator-for-protobuf.h"
227-
228-
class MessageLite { int SomeField; }; // Sufficient for our purposes.
229228
Arena *some_arena, *some_submessage_arena;
230229

231230
MessageLite *protobuf_leak() {

0 commit comments

Comments
 (0)