1 // RUN: %clang_analyze_cc1 -std=c++11\
2 // RUN: -analyzer-checker=core,cplusplus\
3 // RUN: -analyzer-checker=debug.DebugContainerModeling,debug.ExprInspection\
4 // RUN: -analyzer-config aggressive-binary-operation-simplification=true\
5 // RUN: -analyzer-config c++-container-inlining=false %s -verify
7 // RUN: %clang_analyze_cc1 -std=c++11\
8 // RUN: -analyzer-checker=core,cplusplus\
9 // RUN: -analyzer-checker=debug.DebugContainerModeling,debug.ExprInspection\
10 // RUN: -analyzer-config aggressive-binary-operation-simplification=true\
11 // RUN: -analyzer-config c++-container-inlining=true -DINLINE=1 %s -verify
13 #include "Inputs/system-header-simulator-cxx.h"
15 template <typename Container
>
16 long clang_analyzer_container_begin(const Container
&);
17 template <typename Container
>
18 long clang_analyzer_container_end(const Container
&);
19 void clang_analyzer_denote(long, const char*);
20 void clang_analyzer_express(long);
22 void container_begin_end(const std::vector
<int> v0
) {
26 clang_analyzer_denote(clang_analyzer_container_begin(v0
), "$b0");
27 clang_analyzer_denote(clang_analyzer_container_end(v0
), "$e0");
29 clang_analyzer_express(clang_analyzer_container_begin(v0
)); // expected-warning{{$b0}}
30 clang_analyzer_express(clang_analyzer_container_end(v0
)); // expected-warning{{$e0}}