-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
84,910 additions
and
83,867 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
#pragma safety enable | ||
|
||
int strcmp(const char* s1, const char* s2); | ||
char* _Opt f(); | ||
|
||
int main() | ||
struct X | ||
{ | ||
const char* _Opt s = f(); | ||
if (s && strcmp(s, "a") == 0) | ||
char* _Owner _Opt text; | ||
}; | ||
|
||
void free(void* _Owner _Opt p); | ||
void* _Owner _Opt calloc(int n, int sz); | ||
|
||
|
||
struct X* _Owner make(); | ||
char* _Owner _Opt strdup(const char* s); | ||
|
||
void f(int condition) | ||
{ | ||
struct X* _Owner _Opt p = calloc(1, sizeof * p); | ||
try | ||
{ | ||
if (p == nullptr) | ||
throw; | ||
|
||
|
||
if (condition) | ||
throw; | ||
p->text = strdup("a"); | ||
} | ||
else if (s) | ||
catch | ||
{ | ||
} | ||
} | ||
|
Oops, something went wrong.