summaryrefslogtreecommitdiff
path: root/test/Analysis/templates.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/templates.cpp')
-rw-r--r--test/Analysis/templates.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/Analysis/templates.cpp b/test/Analysis/templates.cpp
index 671aa78582041..faa5c1a762094 100644
--- a/test/Analysis/templates.cpp
+++ b/test/Analysis/templates.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -fblocks -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -fblocks -analyzer-config c++-template-inlining=false -DNO_INLINE -verify %s
void clang_analyzer_eval(bool);
@@ -39,6 +40,11 @@ inline unsigned array_lengthof(T (&)[N]) {
void testNonTypeTemplateInstantiation() {
const char *S[] = { "a", "b" };
- clang_analyzer_eval(array_lengthof(S) == 2); // expected-warning{{TRUE}}
+ clang_analyzer_eval(array_lengthof(S) == 2);
+#ifndef NO_INLINE
+ // expected-warning@-2 {{TRUE}}
+#else
+ // expected-warning@-4 {{UNKNOWN}}
+#endif
}