[Clang][SME2] Enable multi-vector loads & stores for SME2 (#75821)
[llvm-project.git] / compiler-rt / lib / asan / tests / asan_exceptions_test.cpp
blobecd406de7561fc0dd0ab721b574b6ccca28393ff
1 // See http://llvm.org/bugs/show_bug.cgi?id=11468
2 #include <stdio.h>
3 #include <string>
5 class Action {
6 public:
7 Action() {}
8 void PrintString(const std::string& msg) const {
9 fprintf(stderr, "%s\n", msg.c_str());
11 void Throw(const char& arg) const {
12 PrintString("PrintString called!"); // this line is important
13 throw arg;
17 int main() {
18 const Action a;
19 fprintf(stderr, "&a before = %p\n", &a);
20 try {
21 a.Throw('c');
22 } catch(const char&) {
23 fprintf(stderr, "&a in catch = %p\n", &a);
25 fprintf(stderr, "&a final = %p\n", &a);
26 return 0;