[analyzer] Add support for __builtin_addressof.
...so we don't regress on std::addressof.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186140 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/builtin-functions.cpp b/test/Analysis/builtin-functions.cpp
new file mode 100644
index 0000000..5c18665
--- /dev/null
+++ b/test/Analysis/builtin-functions.cpp
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,debug.ExprInspection %s -std=c++11 -verify
+
+void clang_analyzer_eval(bool);
+
+void test(int x) {
+ clang_analyzer_eval(&x == __builtin_addressof(x)); // expected-warning{{TRUE}}
+}