mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-29 00:08:59 -04:00

Summary: Until we find a decent heuristic on how to choose between multiple identical trees, there is no point in supporting multiple mappings. This also enables matching of nodes with parents of different types, because there are many instances where this is appropriate. For example for and foreach statements; functions in the global or other namespaces. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36183 llvm-svn: 311251
34 lines
403 B
C++
34 lines
403 B
C++
namespace src {
|
|
|
|
void foo() {
|
|
int x = 321;
|
|
}
|
|
|
|
void main() { foo(); };
|
|
|
|
const char *a = "foo";
|
|
|
|
typedef unsigned int nat;
|
|
|
|
int p = 1 * 2 * 3 * 4;
|
|
int squared = p * p;
|
|
|
|
class X {
|
|
const char *foo(int i) {
|
|
if (i == 0)
|
|
return "foo";
|
|
return 0;
|
|
}
|
|
|
|
public:
|
|
X(){};
|
|
|
|
int id(int i) { return i; }
|
|
};
|
|
}
|
|
|
|
void m() { int x = 0 + 0 + 0; }
|
|
int um = 1 * 2 + 3;
|
|
|
|
void f1() {{ (void) __func__;;; }}
|