Reviewed By: sblackshear Differential Revision: D3876214 fbshipit-source-id: a9032dcmaster
							parent
							
								
									25cd7dbe89
								
							
						
					
					
						commit
						b0980bc35e
					
				| @ -1,5 +0,0 @@ | |||||||
| 
 |  | ||||||
| - It seems that we are never calling print_icfg_dotty with the second |  | ||||||
| argument: "extra edges" |  | ||||||
| 
 |  | ||||||
| - What does the location corresponds to for a procdesc created for an external method invocation ? |  | ||||||
| @ -0,0 +1,26 @@ | |||||||
|  | # Copyright (c) 2016 - present Facebook, Inc.
 | ||||||
|  | # All rights reserved.
 | ||||||
|  | #
 | ||||||
|  | # This source code is licensed under the BSD style license found in the
 | ||||||
|  | # LICENSE file in the root directory of this source tree. An additional grant
 | ||||||
|  | # of patent rights can be found in the PATENTS file in the same directory.
 | ||||||
|  | 
 | ||||||
|  | ROOT_DIR = ../../../../.. | ||||||
|  | include $(ROOT_DIR)/Makefile.config | ||||||
|  | 
 | ||||||
|  | default: compile | ||||||
|  | 
 | ||||||
|  | test: capture | ||||||
|  | 	for file in $(FILES) ; do \
 | ||||||
|  |     diff -u $$file.dot $$file.test.dot ; \
 | ||||||
|  | 	done | ||||||
|  | 	make clean | ||||||
|  | 
 | ||||||
|  | replace: capture | ||||||
|  | 	for file in $(FILES) ; do \
 | ||||||
|  |     mv $$file.test.dot $$file.dot ; \
 | ||||||
|  | 	done | ||||||
|  | 	make clean | ||||||
|  | 
 | ||||||
|  | clean: | ||||||
|  | 	rm -rf infer-out *.o */*.test.dot | ||||||
| @ -0,0 +1,20 @@ | |||||||
|  | # Copyright (c) 2016 - present Facebook, Inc.
 | ||||||
|  | # All rights reserved.
 | ||||||
|  | #
 | ||||||
|  | # This source code is licensed under the BSD style license found in the
 | ||||||
|  | # LICENSE file in the root directory of this source tree. An additional grant
 | ||||||
|  | # of patent rights can be found in the PATENTS file in the same directory.
 | ||||||
|  | 
 | ||||||
|  | include ../../Makefile.frontend | ||||||
|  | 
 | ||||||
|  | OPTIONS = -c | ||||||
|  | 
 | ||||||
|  | FILES = \
 | ||||||
|  |   */*.c \
 | ||||||
|  |   */*.cpp \
 | ||||||
|  | 
 | ||||||
|  | compile: | ||||||
|  | 	clang $(OPTIONS) $(FILES) | ||||||
|  | 
 | ||||||
|  | capture: | ||||||
|  | 	infer -a capture --frontend-tests --cxx -- clang $(OPTIONS) $(FILES) | ||||||
| @ -1,42 +1,64 @@ | |||||||
|  | /* @generated */ | ||||||
| digraph iCFG { | digraph iCFG { | ||||||
| 10 [label="10:  ConditinalStmt Branch \n   DECLARE_LOCALS(&SIL_temp_conditional___4); [line -1]\n  *&SIL_temp_conditional___4:void =0 [line -1]\n " shape="box"] | 15 [label="15:  ConditinalStmt Branch \n   *&0$?%__sil_tmpSIL_temp_conditional___n$2:void =0 [line 17]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 10 -> 4 ; | 	 15 -> 4 ; | ||||||
| 9 [label="9: Prune (true branch) \n   PRUNE(1, true); [line -1]\n  APPLY_ABSTRACTION; [line -1]\n " shape="invhouse"] | 14 [label="14:  ConditinalStmt Branch \n   *&0$?%__sil_tmpSIL_temp_conditional___n$2:void =-1 [line 17]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 9 -> 8 ; | 	 14 -> 4 ; | ||||||
| 8 [label="8: + \n   DECLARE_LOCALS(&SIL_temp_conditional___4); [line -1]\n  *&SIL_temp_conditional___4:void =-1 [line -1]\n " ] | 13 [label="13: Prune (true branch) \n   PRUNE(0, true); [line 17]\n " shape="invhouse"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 8 -> 9 ; | 	 13 -> 14 ; | ||||||
| 7 [label="7: Prune (false branch) \n   PRUNE(!n$3, false); [line -1]\n  REMOVE_TEMPS(n$2,n$3); [line -1]\n " shape="invhouse"] | 12 [label="12: Prune (false branch) \n   n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int  [line 17]\n  PRUNE((n$5 == 0), false); [line 17]\n " shape="invhouse"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 7 -> 10 ; | 	 12 -> 15 ; | ||||||
| 6 [label="6: Prune (true branch) \n   PRUNE(n$3, true); [line -1]\n  REMOVE_TEMPS(n$2,n$3); [line -1]\n  APPLY_ABSTRACTION; [line -1]\n " shape="invhouse"] | 11 [label="11: Prune (true branch) \n   n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int  [line 17]\n  PRUNE((n$5 != 0), true); [line 17]\n " shape="invhouse"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
|  | 	 11 -> 13 ; | ||||||
|  | 10 [label="10:  ConditinalStmt Branch \n   *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =1 [line 17]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 10 -> 5 ; | ||||||
|  | 9 [label="9:  ConditinalStmt Branch \n   *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =0 [line 17]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 9 -> 5 ; | ||||||
|  | 8 [label="8: Prune (false branch) \n   PRUNE(((n$4 != 0) == 0), false); [line 17]\n " shape="invhouse"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 8 -> 10 ; | ||||||
|  | 7 [label="7: Prune (true branch) \n   PRUNE(((n$4 != 0) != 0), true); [line 17]\n " shape="invhouse"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 7 -> 9 ; | ||||||
|  | 6 [label="6:  BinaryOperatorStmt: NE \n   n$4=*&activeq:struct MyPoint * [line 17]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 6 -> 7 ; | ||||||
| 	 6 -> 8 ; | 	 6 -> 8 ; | ||||||
| 5 [label="5:  Call _fun_infer__builtin_expect \n   n$2=*&activeq:struct MyPoint * [line 8]\n  n$3=_fun_infer__builtin_expect(!(n$2 != 0):long ,0:long ) [line -1]\n " shape="box"] | 5 [label="5: + \n  " ] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 5 -> 6 ; | 	 5 -> 11 ; | ||||||
| 	 5 -> 7 ; | 	 5 -> 12 ; | ||||||
| 4 [label="4: + \n  " ] | 4 [label="4: + \n  " ] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 4 -> 3 ; | 	 4 -> 3 ; | ||||||
| 3 [label="3:  Return Stmt \n   n$0=*&activeq:struct MyPoint * [line 9]\n  n$1=*n$0.x:int  [line 9]\n  *&return:int =n$1 [line 9]\n  REMOVE_TEMPS(n$0,n$1); [line 9]\n  NULLIFY(&activeq,false); [line 9]\n  APPLY_ABSTRACTION; [line 9]\n " shape="box"] | 3 [label="3:  Return Stmt \n   n$0=*&activeq:struct MyPoint * [line 18]\n  n$1=*n$0.x:int  [line 18]\n  *&return:int =n$1 [line 18]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 3 -> 2 ; | 	 3 -> 2 ; | ||||||
| 2 [label="2: Exit test \n  " color=yellow style=filled] | 2 [label="2: Exit test_assert \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 1 [label="1: Start test\nFormals:  activeq:struct MyPoint *\nLocals:  \n   DECLARE_LOCALS(&return); [line 7]\n " color=yellow style=filled] | 1 [label="1: Start test_assert\nFormals:  activeq:struct MyPoint *\nLocals:  0$?%__sil_tmpSIL_temp_conditional___n$2:void  0$?%__sil_tmpSIL_temp_conditional___n$3:int  \n   DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_temp_conditional___n$3); [line 16]\n " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 1 -> 5 ; | 	 1 -> 6 ; | ||||||
| } | } | ||||||
|  | |||||||
| @ -0,0 +1,19 @@ | |||||||
|  | # Copyright (c) 2016 - present Facebook, Inc.
 | ||||||
|  | # All rights reserved.
 | ||||||
|  | #
 | ||||||
|  | # This source code is licensed under the BSD style license found in the
 | ||||||
|  | # LICENSE file in the root directory of this source tree. An additional grant
 | ||||||
|  | # of patent rights can be found in the PATENTS file in the same directory.
 | ||||||
|  | 
 | ||||||
|  | include ../../Makefile.frontend | ||||||
|  | 
 | ||||||
|  | OPTIONS = -x c++ -std=c++11 -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c | ||||||
|  | 
 | ||||||
|  | FILES = \
 | ||||||
|  |   */*.cpp \
 | ||||||
|  | 
 | ||||||
|  | compile: | ||||||
|  | 	clang $(OPTIONS) $(FILES) | ||||||
|  | 
 | ||||||
|  | capture: | ||||||
|  | 	infer -a capture --frontend-tests --cxx --headers -- clang $(OPTIONS) $(FILES) | ||||||
| @ -1,46 +1,72 @@ | |||||||
| /* @generated */ | /* @generated */ | ||||||
| digraph iCFG { | digraph iCFG { | ||||||
| 11 [label="11:  DeclStmt \n   *&0$?%__sil_tmpSIL_materialize_temp__n$0[0]:int =1 [line 24]\n  *&0$?%__sil_tmpSIL_materialize_temp__n$0[1]:int =2 [line 24]\n  *&0$?%__sil_tmpSIL_materialize_temp__n$0[2]:int =3 [line 24]\n  *&0$?%__sil_tmpSIL_materialize_temp__n$0[3]:int =4 [line 24]\n  *&0$?%__sil_tmpSIL_materialize_temp__n$0[4]:int =5 [line 24]\n  n$1=_fun___infer_skip_function(&0$?%__sil_tmpSIL_materialize_temp__n$0:int [5]) [line 24]\n  _fun_X_X(&x:class X *,n$1:class std::initializer_list<int> ) [line 24]\n " shape="box"] | 18 [label="18:  DeclStmt \n   *&0$?%__sil_tmpSIL_materialize_temp__n$0[0]:int =1 [line 24]\n  *&0$?%__sil_tmpSIL_materialize_temp__n$0[1]:int =2 [line 24]\n  *&0$?%__sil_tmpSIL_materialize_temp__n$0[2]:int =3 [line 24]\n  *&0$?%__sil_tmpSIL_materialize_temp__n$0[3]:int =4 [line 24]\n  *&0$?%__sil_tmpSIL_materialize_temp__n$0[4]:int =5 [line 24]\n  n$1=_fun___infer_skip_function(&0$?%__sil_tmpSIL_materialize_temp__n$0:int [5]) [line 24]\n  _fun_X_X(&x:class X *,n$1:class std::initializer_list<int> ) [line 24]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 11 -> 10 ; | 	 18 -> 17 ; | ||||||
| 10 [label="10: Exit main \n  " color=yellow style=filled] | 17 [label="17: Exit main \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 9 [label="9: Start main\nFormals: \nLocals:  x:class X  0$?%__sil_tmpSIL_materialize_temp__n$0:int [5] \n   DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$0); [line 24]\n " color=yellow style=filled] | 16 [label="16: Start main\nFormals: \nLocals:  x:class X  0$?%__sil_tmpSIL_materialize_temp__n$0:int [5] \n   DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$0); [line 24]\n " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 9 -> 11 ; | 	 16 -> 18 ; | ||||||
| 8 [label="8: Prune (false branch) \n   PRUNE(((n$4 != n$7) == 0), false); [line 15]\n " shape="invhouse"] | 15 [label="15:  BinaryOperatorStmt: Assign \n   n$8=*&this:class X * [line 16]\n  n$9=*&this:class X * [line 16]\n  n$10=*n$9.sum:int  [line 16]\n  n$11=*&i:int * [line 16]\n  n$12=*n$11:int  [line 16]\n  *n$8.sum:int =(n$10 + n$12) [line 16]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 8 -> 2 ; | 	 15 -> 11 ; | ||||||
| 7 [label="7: Prune (true branch) \n   PRUNE(((n$4 != n$7) != 0), true); [line 15]\n " shape="invhouse"] | 14 [label="14: Prune (false branch) \n   PRUNE(((n$4 != n$7) == 0), false); [line 15]\n " shape="invhouse"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 7 -> 5 ; | 	 14 -> 8 ; | ||||||
| 6 [label="6:  BinaryOperatorStmt: NE \n   n$4=*&i:int * [line 15]\n  n$5=*&list:class std::initializer_list<int> & [line 15]\n  _=*n$5:class std::initializer_list<int>  [line 15]\n  n$7=_fun_std::initializer_list<int>_end(n$5:class std::initializer_list<int> &) [line 15]\n " shape="box"] | 13 [label="13: Prune (true branch) \n   PRUNE(((n$4 != n$7) != 0), true); [line 15]\n " shape="invhouse"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 6 -> 7 ; | 	 13 -> 15 ; | ||||||
| 	 6 -> 8 ; | 12 [label="12:  BinaryOperatorStmt: NE \n   n$4=*&i:int * [line 15]\n  n$5=*&list:class std::initializer_list<int> & [line 15]\n  _=*n$5:class std::initializer_list<int>  [line 15]\n  n$7=_fun_std::initializer_list<int>_end(n$5:class std::initializer_list<int> &) [line 15]\n " shape="box"] | ||||||
| 5 [label="5:  UnaryOperator \n   n$3=*&i:int * [line 15]\n  *&i:int *=(n$3 + 1) [line 15]\n " shape="box"] |  | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 5 -> 3 ; | 	 12 -> 13 ; | ||||||
| 4 [label="4:  DeclStmt \n   n$0=*&list:class std::initializer_list<int> & [line 15]\n  _=*n$0:class std::initializer_list<int>  [line 15]\n  n$2=_fun_std::initializer_list<int>_begin(n$0:class std::initializer_list<int> &) [line 15]\n  *&i:int *=n$2 [line 15]\n " shape="box"] | 	 12 -> 14 ; | ||||||
|  | 11 [label="11:  UnaryOperator \n   n$3=*&i:int * [line 15]\n  *&i:int *=(n$3 + 1) [line 15]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 4 -> 3 ; | 	 11 -> 9 ; | ||||||
| 3 [label="3: + \n  " ] | 10 [label="10:  DeclStmt \n   n$0=*&list:class std::initializer_list<int> & [line 15]\n  _=*n$0:class std::initializer_list<int>  [line 15]\n  n$2=_fun_std::initializer_list<int>_begin(n$0:class std::initializer_list<int> &) [line 15]\n  *&i:int *=n$2 [line 15]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 3 -> 6 ; | 	 10 -> 9 ; | ||||||
| 2 [label="2: Exit X_X \n  " color=yellow style=filled] | 9 [label="9: + \n  " ] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 1 [label="1: Start X_X\nFormals:  this:class X * list:class std::initializer_list<int> &\nLocals:  i:int * \n   DECLARE_LOCALS(&return,&i); [line 14]\n " color=yellow style=filled] | 	 9 -> 12 ; | ||||||
|  | 8 [label="8: Exit X_X \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 1 -> 4 ; | 7 [label="7: Start X_X\nFormals:  this:class X * list:class std::initializer_list<int> &\nLocals:  i:int * \n   DECLARE_LOCALS(&return,&i); [line 14]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 7 -> 10 ; | ||||||
|  | 6 [label="6:  Return Stmt \n   n$0=*&this:class std::initializer_list<int> * [line 93]\n  n$1=*n$0.__begin_:int * [line 93]\n  n$2=*&this:class std::initializer_list<int> * [line 93]\n  n$3=*n$2.__size_:unsigned long  [line 93]\n  *&return:int *=(n$1 + n$3) [line 93]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 6 -> 5 ; | ||||||
|  | 5 [label="5: Exit std::initializer_list<int>_end \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 4 [label="4: Start std::initializer_list<int>_end\nFormals:  this:class std::initializer_list<int> *\nLocals:  \n   DECLARE_LOCALS(&return); [line 91]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 4 -> 6 ; | ||||||
|  | 3 [label="3:  Return Stmt \n   n$0=*&this:class std::initializer_list<int> * [line 89]\n  n$1=*n$0.__begin_:int * [line 89]\n  *&return:int *=n$1 [line 89]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 3 -> 2 ; | ||||||
|  | 2 [label="2: Exit std::initializer_list<int>_begin \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 1 [label="1: Start std::initializer_list<int>_begin\nFormals:  this:class std::initializer_list<int> *\nLocals:  \n   DECLARE_LOCALS(&return); [line 87]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 1 -> 3 ; | ||||||
| } | } | ||||||
|  | |||||||
| @ -0,0 +1,128 @@ | |||||||
|  | /* @generated */ | ||||||
|  | digraph iCFG { | ||||||
|  | 34 [label="34:  DeclStmt \n   *&0$?%__sil_tmpSIL_materialize_temp__n$1:class fooOK::lambda_lambda_lambda1.cpp:26:12 =(_fun_fooOK::lambda_lambda_lambda1.cpp:26:12_operator()) [line 26]\n  _fun_fooOK::lambda_lambda_lambda1.cpp:26:12_(&y:class fooOK::lambda_lambda_lambda1.cpp:26:12 *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class fooOK::lambda_lambda_lambda1.cpp:26:12 &) [line 26]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 34 -> 31 ; | ||||||
|  | 33 [label="33: Exit fooOK::lambda_lambda_lambda1.cpp:26:12_ \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 32 [label="32: Start fooOK::lambda_lambda_lambda1.cpp:26:12_\nFormals:  this:class fooOK::lambda_lambda_lambda1.cpp:26:12 * __param_0:class fooOK::lambda_lambda_lambda1.cpp:26:12 &\nLocals:  \n   DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 32 -> 33 ; | ||||||
|  | 31 [label="31:  Return Stmt \n   n$0=_fun_fooOK::lambda_lambda_lambda1.cpp:26:12_operator()(&y:class fooOK::lambda_lambda_lambda1.cpp:26:12 &,3:int ) [line 27]\n  *&return:int =(5 / (4 - n$0)) [line 27]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 31 -> 27 ; | ||||||
|  | 30 [label="30:  Return Stmt \n   n$0=*&i:int  [line 26]\n  *&i:int =(n$0 + 1) [line 26]\n  *&return:int =n$0 [line 26]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 30 -> 29 ; | ||||||
|  | 29 [label="29: Exit fooOK::lambda_lambda_lambda1.cpp:26:12_operator() \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 28 [label="28: Start fooOK::lambda_lambda_lambda1.cpp:26:12_operator()\nFormals:  this:class fooOK::lambda_lambda_lambda1.cpp:26:12 * i:int \nLocals:  \n   DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 28 -> 30 ; | ||||||
|  | 27 [label="27: Exit fooOK \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 26 [label="26: Start fooOK\nFormals: \nLocals:  y:class fooOK::lambda_lambda_lambda1.cpp:26:12  0$?%__sil_tmpSIL_materialize_temp__n$1:class fooOK::lambda_lambda_lambda1.cpp:26:12  \n   DECLARE_LOCALS(&return,&y,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 24]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 26 -> 34 ; | ||||||
|  | 25 [label="25:  DeclStmt \n   *&0$?%__sil_tmpSIL_materialize_temp__n$2:class foo::lambda_lambda_lambda1.cpp:19:17 =(_fun_foo::lambda_lambda_lambda1.cpp:19:17_operator()) [line 19]\n  _fun_foo::lambda_lambda_lambda1.cpp:19:17_(&unused:class foo::lambda_lambda_lambda1.cpp:19:17 *,&0$?%__sil_tmpSIL_materialize_temp__n$2:class foo::lambda_lambda_lambda1.cpp:19:17 &) [line 19]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 25 -> 19 ; | ||||||
|  | 24 [label="24:  Return Stmt \n   *&return:int =(1 / 0) [line 19]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 24 -> 23 ; | ||||||
|  | 23 [label="23: Exit foo::lambda_lambda_lambda1.cpp:19:17_operator() \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 22 [label="22: Start foo::lambda_lambda_lambda1.cpp:19:17_operator()\nFormals:  this:class foo::lambda_lambda_lambda1.cpp:19:17 *\nLocals:  \n   DECLARE_LOCALS(&return); [line 19]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 22 -> 24 ; | ||||||
|  | 21 [label="21: Exit foo::lambda_lambda_lambda1.cpp:19:17_ \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 20 [label="20: Start foo::lambda_lambda_lambda1.cpp:19:17_\nFormals:  this:class foo::lambda_lambda_lambda1.cpp:19:17 * __param_0:class foo::lambda_lambda_lambda1.cpp:19:17 &\nLocals:  \n   DECLARE_LOCALS(&return); [line 19]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 20 -> 21 ; | ||||||
|  | 19 [label="19:  DeclStmt \n   *&0$?%__sil_tmpSIL_materialize_temp__n$1:class foo::lambda_lambda_lambda1.cpp:20:12 =(_fun_foo::lambda_lambda_lambda1.cpp:20:12_operator()) [line 20]\n  _fun_foo::lambda_lambda_lambda1.cpp:20:12_(&y:class foo::lambda_lambda_lambda1.cpp:20:12 *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class foo::lambda_lambda_lambda1.cpp:20:12 &) [line 20]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 19 -> 16 ; | ||||||
|  | 18 [label="18: Exit foo::lambda_lambda_lambda1.cpp:20:12_ \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 17 [label="17: Start foo::lambda_lambda_lambda1.cpp:20:12_\nFormals:  this:class foo::lambda_lambda_lambda1.cpp:20:12 * __param_0:class foo::lambda_lambda_lambda1.cpp:20:12 &\nLocals:  \n   DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 17 -> 18 ; | ||||||
|  | 16 [label="16:  Return Stmt \n   n$0=_fun_foo::lambda_lambda_lambda1.cpp:20:12_operator()(&y:class foo::lambda_lambda_lambda1.cpp:20:12 &,3:int ) [line 21]\n  *&return:int =(5 / (4 - n$0)) [line 21]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 16 -> 12 ; | ||||||
|  | 15 [label="15:  Return Stmt \n   n$0=*&i:int  [line 20]\n  *&i:int =(n$0 + 1) [line 20]\n  n$1=*&i:int  [line 20]\n  *&return:int =n$1 [line 20]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 15 -> 14 ; | ||||||
|  | 14 [label="14: Exit foo::lambda_lambda_lambda1.cpp:20:12_operator() \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 13 [label="13: Start foo::lambda_lambda_lambda1.cpp:20:12_operator()\nFormals:  this:class foo::lambda_lambda_lambda1.cpp:20:12 * i:int \nLocals:  \n   DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 13 -> 15 ; | ||||||
|  | 12 [label="12: Exit foo \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 11 [label="11: Start foo\nFormals: \nLocals:  y:class foo::lambda_lambda_lambda1.cpp:20:12  0$?%__sil_tmpSIL_materialize_temp__n$1:class foo::lambda_lambda_lambda1.cpp:20:12  unused:class foo::lambda_lambda_lambda1.cpp:19:17  0$?%__sil_tmpSIL_materialize_temp__n$2:class foo::lambda_lambda_lambda1.cpp:19:17  \n   DECLARE_LOCALS(&return,&y,&0$?%__sil_tmpSIL_materialize_temp__n$1,&unused,&0$?%__sil_tmpSIL_materialize_temp__n$2); [line 18]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 11 -> 25 ; | ||||||
|  | 10 [label="10:  DeclStmt \n   *&0$?%__sil_tmpSIL_materialize_temp__n$1:class bar::lambda_lambda_lambda1.cpp:11:15 =(_fun_bar::lambda_lambda_lambda1.cpp:11:15_operator()) [line 11]\n  _fun_bar::lambda_lambda_lambda1.cpp:11:15_(&func:class bar::lambda_lambda_lambda1.cpp:11:15 *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class bar::lambda_lambda_lambda1.cpp:11:15 &) [line 11]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 10 -> 7 ; | ||||||
|  | 9 [label="9: Exit bar::lambda_lambda_lambda1.cpp:11:15_ \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 8 [label="8: Start bar::lambda_lambda_lambda1.cpp:11:15_\nFormals:  this:class bar::lambda_lambda_lambda1.cpp:11:15 * __param_0:class bar::lambda_lambda_lambda1.cpp:11:15 &\nLocals:  \n   DECLARE_LOCALS(&return); [line 11]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 8 -> 9 ; | ||||||
|  | 7 [label="7:  Return Stmt \n   n$0=_fun_bar::lambda_lambda_lambda1.cpp:11:15_operator()(&func:class bar::lambda_lambda_lambda1.cpp:11:15 &) [line 15]\n  *&return:int =(7 / n$0) [line 15]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 7 -> 2 ; | ||||||
|  | 6 [label="6:  DeclStmt \n   *&i:int =0 [line 12]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 6 -> 5 ; | ||||||
|  | 5 [label="5:  Return Stmt \n   n$0=*&i:int  [line 13]\n  *&return:int =n$0 [line 13]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 5 -> 4 ; | ||||||
|  | 4 [label="4: Exit bar::lambda_lambda_lambda1.cpp:11:15_operator() \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 3 [label="3: Start bar::lambda_lambda_lambda1.cpp:11:15_operator()\nFormals:  this:class bar::lambda_lambda_lambda1.cpp:11:15 *\nLocals:  i:int  \n   DECLARE_LOCALS(&return,&i); [line 11]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 3 -> 6 ; | ||||||
|  | 2 [label="2: Exit bar \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 1 [label="1: Start bar\nFormals: \nLocals:  func:class bar::lambda_lambda_lambda1.cpp:11:15  0$?%__sil_tmpSIL_materialize_temp__n$1:class bar::lambda_lambda_lambda1.cpp:11:15  \n   DECLARE_LOCALS(&return,&func,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 10]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 1 -> 10 ; | ||||||
|  | } | ||||||
| @ -1,277 +1,473 @@ | |||||||
| /* @generated */ | /* @generated */ | ||||||
| digraph iCFG { | digraph iCFG { | ||||||
| 70 [label="70:  DeclStmt \n   _fun_Person_Person(&person:class Person *) [line 63]\n " shape="box"] | 125 [label="125:  DeclStmt \n   _fun_Person_Person(&person:class Person *) [line 63]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 70 -> 65 ; | 	 125 -> 120 ; | ||||||
| 69 [label="69:  Return Stmt \n   *&return:int =(1 / 0) [line 67]\n " shape="box"] | 124 [label="124:  Return Stmt \n   *&return:int =(1 / 0) [line 67]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 69 -> 62 ; | 	 124 -> 117 ; | ||||||
| 68 [label="68:  Return Stmt \n   *&return:int =1 [line 65]\n " shape="box"] | 123 [label="123:  Return Stmt \n   *&return:int =1 [line 65]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 68 -> 62 ; | 	 123 -> 117 ; | ||||||
| 67 [label="67: Prune (false branch) \n   PRUNE(((n$0 == n$3) == 0), false); [line 64]\n " shape="invhouse"] | 122 [label="122: Prune (false branch) \n   PRUNE(((n$0 == n$3) == 0), false); [line 64]\n " shape="invhouse"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 67 -> 69 ; | 	 122 -> 124 ; | ||||||
| 66 [label="66: Prune (true branch) \n   PRUNE(((n$0 == n$3) != 0), true); [line 64]\n " shape="invhouse"] | 121 [label="121: Prune (true branch) \n   PRUNE(((n$0 == n$3) != 0), true); [line 64]\n " shape="invhouse"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 66 -> 68 ; | 	 121 -> 123 ; | ||||||
| 65 [label="65:  BinaryOperatorStmt: EQ \n   n$0=_fun_template_typeid<Person>(&person:class Person &) [line 64]\n  n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,&person:class Person ) [line 64]\n  _=*n$1:class std::type_info  [line 64]\n  n$3=_fun_std::type_info_name(n$1:class std::type_info &) [line 64]\n " shape="box"] | 120 [label="120:  BinaryOperatorStmt: EQ \n   n$0=_fun_template_typeid<Person>(&person:class Person &) [line 64]\n  n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,&person:class Person ) [line 64]\n  _=*n$1:class std::type_info  [line 64]\n  n$3=_fun_std::type_info_name(n$1:class std::type_info &) [line 64]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 65 -> 66 ; | 	 120 -> 121 ; | ||||||
| 	 65 -> 67 ; | 	 120 -> 122 ; | ||||||
| 64 [label="64:  between_join_and_exit \n  " shape="box"] | 119 [label="119:  between_join_and_exit \n  " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 64 -> 62 ; | 	 119 -> 117 ; | ||||||
| 63 [label="63: + \n  " ] | 118 [label="118: + \n  " ] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 63 -> 64 ; | 	 118 -> 119 ; | ||||||
| 62 [label="62: Exit template_type_id_person \n  " color=yellow style=filled] | 117 [label="117: Exit template_type_id_person \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 61 [label="61: Start template_type_id_person\nFormals: \nLocals:  person:class Person  \n   DECLARE_LOCALS(&return,&person); [line 62]\n " color=yellow style=filled] | 116 [label="116: Start template_type_id_person\nFormals: \nLocals:  person:class Person  \n   DECLARE_LOCALS(&return,&person); [line 62]\n " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 61 -> 70 ; | 	 116 -> 125 ; | ||||||
| 60 [label="60:  DeclStmt \n   n$4=*&value:class Person & [line 58]\n  _fun_Person_Person(&0$?%__sil_tmpSIL_materialize_temp__n$3:class Person *,n$4:class Person &) [line 58]\n  _fun_Person_Person(&result:class Person *,&0$?%__sil_tmpSIL_materialize_temp__n$3:class Person &) [line 58]\n " shape="box"] | 115 [label="115:  DeclStmt \n   n$4=*&value:class Person & [line 58]\n  _fun_Person_Person(&0$?%__sil_tmpSIL_materialize_temp__n$3:class Person *,n$4:class Person &) [line 58]\n  _fun_Person_Person(&result:class Person *,&0$?%__sil_tmpSIL_materialize_temp__n$3:class Person &) [line 58]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 60 -> 59 ; | 	 115 -> 114 ; | ||||||
| 59 [label="59:  Return Stmt \n   n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ) [line 59]\n  _=*n$0:class std::type_info  [line 59]\n  n$2=_fun_std::type_info_name(n$0:class std::type_info &) [line 59]\n  *&return:char *=n$2 [line 59]\n " shape="box"] | 114 [label="114:  Return Stmt \n   n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ) [line 59]\n  _=*n$0:class std::type_info  [line 59]\n  n$2=_fun_std::type_info_name(n$0:class std::type_info &) [line 59]\n  *&return:char *=n$2 [line 59]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 59 -> 58 ; | 	 114 -> 113 ; | ||||||
| 58 [label="58: Exit template_typeid<Person> \n  " color=yellow style=filled] | 113 [label="113: Exit template_typeid<Person> \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 57 [label="57: Start template_typeid<Person>\nFormals:  value:class Person &\nLocals:  result:class Person  0$?%__sil_tmpSIL_materialize_temp__n$3:class Person  \n   DECLARE_LOCALS(&return,&result,&0$?%__sil_tmpSIL_materialize_temp__n$3); [line 57]\n " color=yellow style=filled] | 112 [label="112: Start template_typeid<Person>\nFormals:  value:class Person &\nLocals:  result:class Person  0$?%__sil_tmpSIL_materialize_temp__n$3:class Person  \n   DECLARE_LOCALS(&return,&result,&0$?%__sil_tmpSIL_materialize_temp__n$3); [line 57]\n " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 57 -> 60 ; | 	 112 -> 115 ; | ||||||
| 56 [label="56:  DeclStmt \n   _fun_Person_Person(&person:class Person *) [line 49]\n " shape="box"] | 111 [label="111:  DeclStmt \n   _fun_Person_Person(&person:class Person *) [line 49]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 56 -> 51 ; | 	 111 -> 106 ; | ||||||
| 55 [label="55:  Return Stmt \n   *&return:int =0 [line 53]\n " shape="box"] | 110 [label="110:  Return Stmt \n   *&return:int =0 [line 53]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 55 -> 48 ; | 	 110 -> 103 ; | ||||||
| 54 [label="54:  Return Stmt \n   *&return:int =(1 / 0) [line 51]\n " shape="box"] | 109 [label="109:  Return Stmt \n   *&return:int =(1 / 0) [line 51]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 54 -> 48 ; | 	 109 -> 103 ; | ||||||
| 53 [label="53: Prune (false branch) \n   PRUNE(((n$3 == n$6) == 0), false); [line 50]\n " shape="invhouse"] | 108 [label="108: Prune (false branch) \n   PRUNE(((n$3 == n$6) == 0), false); [line 50]\n " shape="invhouse"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 53 -> 55 ; | 	 108 -> 110 ; | ||||||
| 52 [label="52: Prune (true branch) \n   PRUNE(((n$3 == n$6) != 0), true); [line 50]\n " shape="invhouse"] | 107 [label="107: Prune (true branch) \n   PRUNE(((n$3 == n$6) != 0), true); [line 50]\n " shape="invhouse"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 52 -> 54 ; | 	 107 -> 109 ; | ||||||
| 51 [label="51:  BinaryOperatorStmt: EQ \n   n$0=*&ptr:class Person * [line 50]\n  n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,n$0:class Person ) [line 50]\n  _=*n$1:class std::type_info  [line 50]\n  n$3=_fun_std::type_info_name(n$1:class std::type_info &) [line 50]\n  n$4=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$4.__type_name:void ,&person:class Person ) [line 50]\n  _=*n$4:class std::type_info  [line 50]\n  n$6=_fun_std::type_info_name(n$4:class std::type_info &) [line 50]\n " shape="box"] | 106 [label="106:  BinaryOperatorStmt: EQ \n   n$0=*&ptr:class Person * [line 50]\n  n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,n$0:class Person ) [line 50]\n  _=*n$1:class std::type_info  [line 50]\n  n$3=_fun_std::type_info_name(n$1:class std::type_info &) [line 50]\n  n$4=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$4.__type_name:void ,&person:class Person ) [line 50]\n  _=*n$4:class std::type_info  [line 50]\n  n$6=_fun_std::type_info_name(n$4:class std::type_info &) [line 50]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 51 -> 52 ; | 	 106 -> 107 ; | ||||||
| 	 51 -> 53 ; | 	 106 -> 108 ; | ||||||
| 50 [label="50:  between_join_and_exit \n  " shape="box"] | 105 [label="105:  between_join_and_exit \n  " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 50 -> 48 ; | 	 105 -> 103 ; | ||||||
| 49 [label="49: + \n  " ] | 104 [label="104: + \n  " ] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 49 -> 50 ; | 	 104 -> 105 ; | ||||||
| 48 [label="48: Exit person_ptr_typeid \n  " color=yellow style=filled] | 103 [label="103: Exit person_ptr_typeid \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 47 [label="47: Start person_ptr_typeid\nFormals:  ptr:class Person *\nLocals:  person:class Person  \n   DECLARE_LOCALS(&return,&person); [line 48]\n " color=yellow style=filled] | 102 [label="102: Start person_ptr_typeid\nFormals:  ptr:class Person *\nLocals:  person:class Person  \n   DECLARE_LOCALS(&return,&person); [line 48]\n " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 47 -> 56 ; | 	 102 -> 111 ; | ||||||
| 46 [label="46:  DeclStmt \n   _fun_Employee_Employee(&employee:class Employee *) [line 40]\n " shape="box"] | 101 [label="101:  DeclStmt \n   _fun_Employee_Employee(&employee:class Employee *) [line 40]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 46 -> 45 ; | 	 101 -> 100 ; | ||||||
| 45 [label="45:  DeclStmt \n   *&ptr:class Employee *=&employee [line 41]\n " shape="box"] | 100 [label="100:  DeclStmt \n   *&ptr:class Employee *=&employee [line 41]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 45 -> 40 ; | 	 100 -> 95 ; | ||||||
| 44 [label="44:  Return Stmt \n   *&return:int =0 [line 45]\n " shape="box"] | 99 [label="99:  Return Stmt \n   *&return:int =0 [line 45]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 44 -> 37 ; | 	 99 -> 92 ; | ||||||
| 43 [label="43:  Return Stmt \n   *&return:int =(1 / 0) [line 43]\n " shape="box"] | 98 [label="98:  Return Stmt \n   *&return:int =(1 / 0) [line 43]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 43 -> 37 ; | 	 98 -> 92 ; | ||||||
| 42 [label="42: Prune (false branch) \n   PRUNE((n$3 == 0), false); [line 42]\n " shape="invhouse"] | 97 [label="97: Prune (false branch) \n   PRUNE((n$3 == 0), false); [line 42]\n " shape="invhouse"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 42 -> 44 ; | 	 97 -> 99 ; | ||||||
| 41 [label="41: Prune (true branch) \n   PRUNE((n$3 != 0), true); [line 42]\n " shape="invhouse"] | 96 [label="96: Prune (true branch) \n   PRUNE((n$3 != 0), true); [line 42]\n " shape="invhouse"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 41 -> 43 ; | 	 96 -> 98 ; | ||||||
| 40 [label="40:  Call _fun_std::type_info_operator== \n   n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ,&employee:class Employee ) [line 42]\n  n$1=*&ptr:class Person * [line 42]\n  n$2=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$2.__type_name:void ,n$1:class Person ) [line 42]\n  n$3=_fun_std::type_info_operator==(n$0:class std::type_info &,n$2:class std::type_info &) [line 42]\n " shape="box"] | 95 [label="95:  Call _fun_std::type_info_operator== \n   n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ,&employee:class Employee ) [line 42]\n  n$1=*&ptr:class Person * [line 42]\n  n$2=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$2.__type_name:void ,n$1:class Person ) [line 42]\n  n$3=_fun_std::type_info_operator==(n$0:class std::type_info &,n$2:class std::type_info &) [line 42]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 40 -> 41 ; | 	 95 -> 96 ; | ||||||
| 	 40 -> 42 ; | 	 95 -> 97 ; | ||||||
| 39 [label="39:  between_join_and_exit \n  " shape="box"] | 94 [label="94:  between_join_and_exit \n  " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 39 -> 37 ; | 	 94 -> 92 ; | ||||||
| 38 [label="38: + \n  " ] | 93 [label="93: + \n  " ] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 38 -> 39 ; | 	 93 -> 94 ; | ||||||
| 37 [label="37: Exit employee_typeid \n  " color=yellow style=filled] | 92 [label="92: Exit employee_typeid \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 36 [label="36: Start employee_typeid\nFormals: \nLocals:  ptr:class Person * employee:class Employee  \n   DECLARE_LOCALS(&return,&ptr,&employee); [line 39]\n " color=yellow style=filled] | 91 [label="91: Start employee_typeid\nFormals: \nLocals:  ptr:class Person * employee:class Employee  \n   DECLARE_LOCALS(&return,&ptr,&employee); [line 39]\n " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 36 -> 46 ; | 	 91 -> 101 ; | ||||||
| 35 [label="35:  DeclStmt \n   _fun_Person_Person(&person:class Person *) [line 29]\n " shape="box"] | 90 [label="90:  DeclStmt \n   _fun_Person_Person(&person:class Person *) [line 29]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 90 -> 89 ; | ||||||
|  | 89 [label="89:  DeclStmt \n   *&t:int =3 [line 30]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 89 -> 88 ; | ||||||
|  | 88 [label="88:  DeclStmt \n   n$5=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$5.__type_name:void ,&t:int ) [line 31]\n  _=*n$5:class std::type_info  [line 31]\n  n$7=_fun_std::type_info_name(n$5:class std::type_info &) [line 31]\n  *&t_type_info:char *=n$7 [line 31]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 88 -> 87 ; | ||||||
|  | 87 [label="87:  DeclStmt \n   n$2=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$2.__type_name:void ,&person:class Person ) [line 32]\n  _=*n$2:class std::type_info  [line 32]\n  n$4=_fun_std::type_info_name(n$2:class std::type_info &) [line 32]\n  *&person_type_info:char *=n$4 [line 32]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 87 -> 82 ; | ||||||
|  | 86 [label="86:  Return Stmt \n   *&return:int =(1 / 0) [line 36]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 86 -> 79 ; | ||||||
|  | 85 [label="85:  Return Stmt \n   *&return:int =0 [line 34]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 85 -> 79 ; | ||||||
|  | 84 [label="84: Prune (false branch) \n   PRUNE(((n$0 == n$1) == 0), false); [line 33]\n " shape="invhouse"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 84 -> 86 ; | ||||||
|  | 83 [label="83: Prune (true branch) \n   PRUNE(((n$0 == n$1) != 0), true); [line 33]\n " shape="invhouse"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 83 -> 85 ; | ||||||
|  | 82 [label="82:  BinaryOperatorStmt: EQ \n   n$0=*&t_type_info:char * [line 33]\n  n$1=*&person_type_info:char * [line 33]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 82 -> 83 ; | ||||||
|  | 	 82 -> 84 ; | ||||||
|  | 81 [label="81:  between_join_and_exit \n  " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 81 -> 79 ; | ||||||
|  | 80 [label="80: + \n  " ] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 80 -> 81 ; | ||||||
|  | 79 [label="79: Exit person_typeid_name \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 78 [label="78: Start person_typeid_name\nFormals: \nLocals:  person_type_info:char * t_type_info:char * t:int  person:class Person  \n   DECLARE_LOCALS(&return,&person_type_info,&t_type_info,&t,&person); [line 28]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 78 -> 90 ; | ||||||
|  | 77 [label="77:  DeclStmt \n   _fun_Person_Person(&person:class Person *) [line 20]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 77 -> 76 ; | ||||||
|  | 76 [label="76:  DeclStmt \n   *&t:int =3 [line 21]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 76 -> 71 ; | ||||||
|  | 75 [label="75:  Return Stmt \n   *&return:int =(1 / 0) [line 25]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 75 -> 68 ; | ||||||
|  | 74 [label="74:  Return Stmt \n   *&return:int =1 [line 23]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 74 -> 68 ; | ||||||
|  | 73 [label="73: Prune (false branch) \n   PRUNE((n$2 == 0), false); [line 22]\n " shape="invhouse"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 73 -> 75 ; | ||||||
|  | 72 [label="72: Prune (true branch) \n   PRUNE((n$2 != 0), true); [line 22]\n " shape="invhouse"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 72 -> 74 ; | ||||||
|  | 71 [label="71:  Call _fun_std::type_info_operator== \n   n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ,&t:int ) [line 22]\n  n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,&person:class Person ) [line 22]\n  n$2=_fun_std::type_info_operator==(n$0:class std::type_info &,n$1:class std::type_info &) [line 22]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 71 -> 72 ; | ||||||
|  | 	 71 -> 73 ; | ||||||
|  | 70 [label="70:  between_join_and_exit \n  " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 70 -> 68 ; | ||||||
|  | 69 [label="69: + \n  " ] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 69 -> 70 ; | ||||||
|  | 68 [label="68: Exit person_typeid \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 67 [label="67: Start person_typeid\nFormals: \nLocals:  t:int  person:class Person  \n   DECLARE_LOCALS(&return,&t,&person); [line 19]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 67 -> 77 ; | ||||||
|  | 66 [label="66:  Constructor Init \n   n$0=*&this:class Employee * [line 17]\n  _fun_Person_Person(n$0:class Employee *) [line 17]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 66 -> 65 ; | ||||||
|  | 65 [label="65: Exit Employee_Employee \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 64 [label="64: Start Employee_Employee\nFormals:  this:class Employee *\nLocals:  \n   DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 64 -> 66 ; | ||||||
|  | 63 [label="63: Exit Employee_~Employee \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 62 [label="62: Start Employee_~Employee\nFormals:  this:class Employee *\nLocals:  \n   DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 62 -> 63 ; | ||||||
|  | 61 [label="61: Exit Person_Person \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 60 [label="60: Start Person_Person\nFormals:  this:class Person *\nLocals:  \n   DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 60 -> 61 ; | ||||||
|  | 59 [label="59: Exit Person_Person \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 58 [label="58: Start Person_Person\nFormals:  this:class Person * __param_0:class Person &\nLocals:  \n   DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 58 -> 59 ; | ||||||
|  | 57 [label="57: Exit Person_~Person \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 56 [label="56: Start Person_~Person\nFormals:  this:class Person *\nLocals:  \n   DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 56 -> 57 ; | ||||||
|  | 55 [label="55: Exit std::type_info_operator!= \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 54 [label="54: Start std::type_info_operator!=\nFormals:  this:class std::type_info * __arg:class std::type_info &\nLocals:  \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 53 [label="53: Exit std::type_info_operator== \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 52 [label="52: Start std::type_info_operator==\nFormals:  this:class std::type_info * __arg:class std::type_info &\nLocals:  \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 51 [label="51:  Return Stmt \n   n$0=*&this:class std::type_info * [line 116]\n  n$1=*n$0.__type_name:unsigned long  [line 116]\n  *&return:unsigned long =n$1 [line 116]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 51 -> 50 ; | ||||||
|  | 50 [label="50: Exit std::type_info_hash_code \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 49 [label="49: Start std::type_info_hash_code\nFormals:  this:class std::type_info *\nLocals:  \n   DECLARE_LOCALS(&return); [line 113]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 49 -> 51 ; | ||||||
|  | 48 [label="48:  Return Stmt \n   n$0=*&this:class std::type_info * [line 106]\n  n$1=*n$0.__type_name:char * [line 106]\n  n$2=*&__arg:class std::type_info & [line 106]\n  n$3=*n$2.__type_name:char * [line 106]\n  *&return:_Bool =(n$1 < n$3) [line 106]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 48 -> 47 ; | ||||||
|  | 47 [label="47: Exit std::type_info_before \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 46 [label="46: Start std::type_info_before\nFormals:  this:class std::type_info * __arg:class std::type_info &\nLocals:  \n   DECLARE_LOCALS(&return); [line 103]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 46 -> 48 ; | ||||||
|  | 45 [label="45: Exit std::type_info_name \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 44 [label="44: Start std::type_info_name\nFormals:  this:class std::type_info *\nLocals:  \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 43 [label="43: Exit std::type_info_type_info \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 42 [label="42: Start std::type_info_type_info\nFormals:  this:class std::type_info * __n:char *\nLocals:  \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 41 [label="41:  Return Stmt \n   n$0=*&__return_param:class std::exception_ptr * [line 180]\n  n$1=*&this:class std::nested_exception * [line 180]\n  _fun_std::exception_ptr_exception_ptr(n$0:class std::exception_ptr *,n$1.__ptr_:class std::exception_ptr &) [line 180]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 41 -> 40 ; | ||||||
|  | 40 [label="40: Exit std::nested_exception_nested_ptr \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 39 [label="39: Start std::nested_exception_nested_ptr\nFormals:  this:class std::nested_exception * __return_param:class std::exception_ptr *\nLocals:  \n   DECLARE_LOCALS(&return); [line 180]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 39 -> 41 ; | ||||||
|  | 38 [label="38:  Return Stmt \n   n$0=*&this:class std::exception_ptr * [line 138]\n  n$1=*n$0.__ptr_:void * [line 138]\n  *&return:_Bool =(n$1 != null) [line 138]\n " shape="box"] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 38 -> 37 ; | ||||||
|  | 37 [label="37: Exit std::exception_ptr_operator_bool \n  " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 36 [label="36: Start std::exception_ptr_operator_bool\nFormals:  this:class std::exception_ptr *\nLocals:  \n   DECLARE_LOCALS(&return); [line 136]\n " color=yellow style=filled] | ||||||
|  | 	 | ||||||
|  | 
 | ||||||
|  | 	 36 -> 38 ; | ||||||
|  | 35 [label="35:  Constructor Init \n   n$0=*&this:class std::exception_ptr * [line 131]\n  *n$0.__ptr_:void *=null [line 131]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 35 -> 34 ; | 	 35 -> 34 ; | ||||||
| 34 [label="34:  DeclStmt \n   *&t:int =3 [line 30]\n " shape="box"] | 34 [label="34: Exit std::exception_ptr_exception_ptr \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 34 -> 33 ; | 33 [label="33: Start std::exception_ptr_exception_ptr\nFormals:  this:class std::exception_ptr * __param_0:int \nLocals:  \n   DECLARE_LOCALS(&return); [line 131]\n " color=yellow style=filled] | ||||||
| 33 [label="33:  DeclStmt \n   n$5=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$5.__type_name:void ,&t:int ) [line 31]\n  _=*n$5:class std::type_info  [line 31]\n  n$7=_fun_std::type_info_name(n$5:class std::type_info &) [line 31]\n  *&t_type_info:char *=n$7 [line 31]\n " shape="box"] |  | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 33 -> 32 ; | 	 33 -> 35 ; | ||||||
| 32 [label="32:  DeclStmt \n   n$2=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$2.__type_name:void ,&person:class Person ) [line 32]\n  _=*n$2:class std::type_info  [line 32]\n  n$4=_fun_std::type_info_name(n$2:class std::type_info &) [line 32]\n  *&person_type_info:char *=n$4 [line 32]\n " shape="box"] | 32 [label="32:  Constructor Init \n   n$0=*&this:class std::exception_ptr * [line 130]\n  *n$0.__ptr_:void *=null [line 130]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 32 -> 27 ; | 	 32 -> 31 ; | ||||||
| 31 [label="31:  Return Stmt \n   *&return:int =(1 / 0) [line 36]\n " shape="box"] | 31 [label="31: Exit std::exception_ptr_exception_ptr \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 31 -> 24 ; | 30 [label="30: Start std::exception_ptr_exception_ptr\nFormals:  this:class std::exception_ptr *\nLocals:  \n   DECLARE_LOCALS(&return); [line 130]\n " color=yellow style=filled] | ||||||
| 30 [label="30:  Return Stmt \n   *&return:int =0 [line 34]\n " shape="box"] |  | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 30 -> 24 ; | 	 30 -> 32 ; | ||||||
| 29 [label="29: Prune (false branch) \n   PRUNE(((n$0 == n$1) == 0), false); [line 33]\n " shape="invhouse"] | 29 [label="29:  Constructor Init \n   n$0=*&this:class std::bad_exception * [line 103]\n  _fun_std::exception_exception(n$0:class std::bad_exception *) [line 103]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 29 -> 31 ; | 	 29 -> 28 ; | ||||||
| 28 [label="28: Prune (true branch) \n   PRUNE(((n$0 == n$1) != 0), true); [line 33]\n " shape="invhouse"] | 28 [label="28: Exit std::bad_exception_bad_exception \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 28 -> 30 ; | 27 [label="27: Start std::bad_exception_bad_exception\nFormals:  this:class std::bad_exception *\nLocals:  \n   DECLARE_LOCALS(&return); [line 103]\n " color=yellow style=filled] | ||||||
| 27 [label="27:  BinaryOperatorStmt: EQ \n   n$0=*&t_type_info:char * [line 33]\n  n$1=*&person_type_info:char * [line 33]\n " shape="box"] |  | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 27 -> 28 ; |  | ||||||
| 	 27 -> 29 ; | 	 27 -> 29 ; | ||||||
| 26 [label="26:  between_join_and_exit \n  " shape="box"] | 26 [label="26: Exit std::exception_exception \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 26 -> 24 ; | 25 [label="25: Start std::exception_exception\nFormals:  this:class std::exception *\nLocals:  \n   DECLARE_LOCALS(&return); [line 94]\n " color=yellow style=filled] | ||||||
| 25 [label="25: + \n  " ] |  | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 25 -> 26 ; | 	 25 -> 26 ; | ||||||
| 24 [label="24: Exit person_typeid_name \n  " color=yellow style=filled] | 24 [label="24:  Return Stmt \n   n$0=*&__val:unsigned int  [line 4332]\n  *&return:unsigned int =n$0 [line 4332]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 23 [label="23: Start person_typeid_name\nFormals: \nLocals:  person_type_info:char * t_type_info:char * t:int  person:class Person  \n   DECLARE_LOCALS(&return,&person_type_info,&t_type_info,&t,&person); [line 28]\n " color=yellow style=filled] | 	 24 -> 23 ; | ||||||
|  | 23 [label="23: Exit std::__1::__convert_to_integral \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 23 -> 35 ; | 22 [label="22: Start std::__1::__convert_to_integral\nFormals:  __val:unsigned int \nLocals:  \n   DECLARE_LOCALS(&return); [line 4331]\n " color=yellow style=filled] | ||||||
| 22 [label="22:  DeclStmt \n   _fun_Person_Person(&person:class Person *) [line 20]\n " shape="box"] |  | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 22 -> 21 ; | 	 22 -> 24 ; | ||||||
| 21 [label="21:  DeclStmt \n   *&t:int =3 [line 21]\n " shape="box"] | 21 [label="21:  Return Stmt \n   n$0=*&__val:int  [line 4329]\n  *&return:int =n$0 [line 4329]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 21 -> 16 ; | 	 21 -> 20 ; | ||||||
| 20 [label="20:  Return Stmt \n   *&return:int =(1 / 0) [line 25]\n " shape="box"] | 20 [label="20: Exit std::__1::__convert_to_integral \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 20 -> 13 ; | 19 [label="19: Start std::__1::__convert_to_integral\nFormals:  __val:int \nLocals:  \n   DECLARE_LOCALS(&return); [line 4328]\n " color=yellow style=filled] | ||||||
| 19 [label="19:  Return Stmt \n   *&return:int =1 [line 23]\n " shape="box"] |  | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 19 -> 13 ; | 	 19 -> 21 ; | ||||||
| 18 [label="18: Prune (false branch) \n   PRUNE((n$2 == 0), false); [line 22]\n " shape="invhouse"] | 18 [label="18:  Return Stmt \n   n$0=*&__val:unsigned long long  [line 4325]\n  *&return:unsigned long long =n$0 [line 4325]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 18 -> 20 ; | 	 18 -> 17 ; | ||||||
| 17 [label="17: Prune (true branch) \n   PRUNE((n$2 != 0), true); [line 22]\n " shape="invhouse"] | 17 [label="17: Exit std::__1::__convert_to_integral \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 17 -> 19 ; | 16 [label="16: Start std::__1::__convert_to_integral\nFormals:  __val:unsigned long long \nLocals:  \n   DECLARE_LOCALS(&return); [line 4324]\n " color=yellow style=filled] | ||||||
| 16 [label="16:  Call _fun_std::type_info_operator== \n   n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ,&t:int ) [line 22]\n  n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,&person:class Person ) [line 22]\n  n$2=_fun_std::type_info_operator==(n$0:class std::type_info &,n$1:class std::type_info &) [line 22]\n " shape="box"] |  | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 16 -> 17 ; |  | ||||||
| 	 16 -> 18 ; | 	 16 -> 18 ; | ||||||
| 15 [label="15:  between_join_and_exit \n  " shape="box"] | 15 [label="15:  Return Stmt \n   n$0=*&__val:long long  [line 4322]\n  *&return:long long =n$0 [line 4322]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 15 -> 13 ; | 	 15 -> 14 ; | ||||||
| 14 [label="14: + \n  " ] | 14 [label="14: Exit std::__1::__convert_to_integral \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 14 -> 15 ; | 13 [label="13: Start std::__1::__convert_to_integral\nFormals:  __val:long long \nLocals:  \n   DECLARE_LOCALS(&return); [line 4321]\n " color=yellow style=filled] | ||||||
| 13 [label="13: Exit person_typeid \n  " color=yellow style=filled] |  | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 12 [label="12: Start person_typeid\nFormals: \nLocals:  t:int  person:class Person  \n   DECLARE_LOCALS(&return,&t,&person); [line 19]\n " color=yellow style=filled] | 	 13 -> 15 ; | ||||||
|  | 12 [label="12:  Return Stmt \n   n$0=*&__val:unsigned long  [line 4319]\n  *&return:unsigned long =n$0 [line 4319]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 12 -> 22 ; | 	 12 -> 11 ; | ||||||
| 11 [label="11:  Constructor Init \n   n$0=*&this:class Employee * [line 17]\n  _fun_Person_Person(n$0:class Employee *) [line 17]\n " shape="box"] | 11 [label="11: Exit std::__1::__convert_to_integral \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 11 -> 10 ; | 10 [label="10: Start std::__1::__convert_to_integral\nFormals:  __val:unsigned long \nLocals:  \n   DECLARE_LOCALS(&return); [line 4318]\n " color=yellow style=filled] | ||||||
| 10 [label="10: Exit Employee_Employee \n  " color=yellow style=filled] |  | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 9 [label="9: Start Employee_Employee\nFormals:  this:class Employee *\nLocals:  \n   DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] | 	 10 -> 12 ; | ||||||
|  | 9 [label="9:  Return Stmt \n   n$0=*&__val:long  [line 4316]\n  *&return:long =n$0 [line 4316]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 9 -> 11 ; | 	 9 -> 8 ; | ||||||
| 8 [label="8: Exit Employee_~Employee \n  " color=yellow style=filled] | 8 [label="8: Exit std::__1::__convert_to_integral \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 7 [label="7: Start Employee_~Employee\nFormals:  this:class Employee *\nLocals:  \n   DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] | 7 [label="7: Start std::__1::__convert_to_integral\nFormals:  __val:long \nLocals:  \n   DECLARE_LOCALS(&return); [line 4315]\n " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 7 -> 8 ; | 	 7 -> 9 ; | ||||||
| 6 [label="6: Exit Person_Person \n  " color=yellow style=filled] | 6 [label="6:  Return Stmt \n   n$0=*&__val:unsigned int  [line 4313]\n  *&return:unsigned int =n$0 [line 4313]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 5 [label="5: Start Person_Person\nFormals:  this:class Person *\nLocals:  \n   DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] | 	 6 -> 5 ; | ||||||
|  | 5 [label="5: Exit std::__1::__convert_to_integral \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 5 -> 6 ; | 4 [label="4: Start std::__1::__convert_to_integral\nFormals:  __val:unsigned int \nLocals:  \n   DECLARE_LOCALS(&return); [line 4312]\n " color=yellow style=filled] | ||||||
| 4 [label="4: Exit Person_Person \n  " color=yellow style=filled] |  | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 3 [label="3: Start Person_Person\nFormals:  this:class Person * __param_0:class Person &\nLocals:  \n   DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] | 	 4 -> 6 ; | ||||||
|  | 3 [label="3:  Return Stmt \n   n$0=*&__val:int  [line 4310]\n  *&return:int =n$0 [line 4310]\n " shape="box"] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 3 -> 4 ; | 	 3 -> 2 ; | ||||||
| 2 [label="2: Exit Person_~Person \n  " color=yellow style=filled] | 2 [label="2: Exit std::__1::__convert_to_integral \n  " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 1 [label="1: Start Person_~Person\nFormals:  this:class Person *\nLocals:  \n   DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled] | 1 [label="1: Start std::__1::__convert_to_integral\nFormals:  __val:int \nLocals:  \n   DECLARE_LOCALS(&return); [line 4309]\n " color=yellow style=filled] | ||||||
| 	 | 	 | ||||||
| 
 | 
 | ||||||
| 	 1 -> 2 ; | 	 1 -> 3 ; | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,62 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class ArithmeticExpTest { |  | ||||||
| 
 |  | ||||||
|   String arithmeticBasePath = "infer/tests/codetoanalyze/c/frontend/arithmetic/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, arithmeticBasePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnPlus_exprThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("plus_expr.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnCompound_assignmentThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("compound_assignment.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnUnaryThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("unary.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnIntConstThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("int_const.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnNegateThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("negate.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,41 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Ignore; |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class AssertionTest { |  | ||||||
| 
 |  | ||||||
|   String conditionalOperatorBasePath = "infer/tests/codetoanalyze/c/frontend/assertions/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles( |  | ||||||
|         folder, |  | ||||||
|         conditionalOperatorBasePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Ignore @Test |  | ||||||
|   public void whenCaptureRunOnAssertExampleThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("assert_example.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,44 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class BoolTest { |  | ||||||
| 
 |  | ||||||
|   String boolBasePath = "infer/tests/codetoanalyze/c/frontend/booleans/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, boolBasePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunCommaThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("bool_example.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureBooleanConditionAsParamThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("condition_as_param.c"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,33 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class CommaOperatorTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunCommaThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = "infer/tests/codetoanalyze/c/frontend/comma/comma.c"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,93 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Ignore; |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class ConditionalOperatorTest { |  | ||||||
| 
 |  | ||||||
|   String conditionalOperatorBasePath = "infer/tests/codetoanalyze/c/frontend/conditional_operator/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, conditionalOperatorBasePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunCommaThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("conditional_operator.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunShortCThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("if_short_circuit.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunCond2ThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("cond2.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnIntNegationThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("int_negation.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunBinaryOperatorThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("binary_operator.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunUnaryOperatorThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("unary_operator.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunArrayAccessThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("array_access.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunMemberAccessThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("member_access.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunPreincrementThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("preincrement.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunFunctionCallThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("function_call.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,48 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class EnumerationTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunEnumThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = "infer/tests/codetoanalyze/c/frontend/enumeration/enum.c"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnOtherEnumThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = "infer/tests/codetoanalyze/c/frontend/enumeration/other_enum.c"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnEnumBitmaskThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = "infer/tests/codetoanalyze/c/frontend/enumeration/enum_bitmask.c"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,36 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class GnuexprTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnWhileThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = |  | ||||||
|         "infer/tests/codetoanalyze/" + |  | ||||||
|             "c/frontend/nestedoperators/gnuexpr.c"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,33 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class GotoStmtLabelStmtTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunGotoStmtThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = "infer/tests/codetoanalyze/c/frontend/gotostmt/goto_ex.c"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,50 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class InitListExprTest { |  | ||||||
| 
 |  | ||||||
|   String initListBasePath = "infer/tests/codetoanalyze/c/frontend/initialization/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, initListBasePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnArrayInitListExprThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("array_initlistexpr.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnStructInitListExprThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("struct_initlistexpr.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnCompoundLiteralExprThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("compound_literal.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,128 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class LoopsTest { |  | ||||||
| 
 |  | ||||||
|   String loopsBasePath = "infer/tests/codetoanalyze/c/frontend/loops/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, loopsBasePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnWhileThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("while.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnWhile_nestedThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("while_nested.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnWhile_side_effectsThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("while_condition_side_effects.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnWhile_no_bodyThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("while_no_body.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnForside_effectsThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("for_condition_side_effects.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnFor_nestedThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("for_nested.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnFor_no_conditionThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("for_no_condition.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnFor_no_conditionincrThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("for_no_condition_incr.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnFor_emptyThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("for_no_condition_incr_body.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnFor_only_bodyThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("for_only_body.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnFor_simpleThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("for_simple.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnFor_while_nestedThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("for_while_nested.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnDo_whileThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("do_while.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnDo_while_side_effectsThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("do_while_condition_side_effects.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnDo_while_nestedThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("do_while_nested.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureWhile_with_continue_and_breakThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("while_with_continue_and_break.c"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,57 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| public class NestedOperatorsTest { |  | ||||||
| 
 |  | ||||||
|   String nestedOperatorsBasePath = "infer/tests/codetoanalyze/c/frontend/nestedoperators/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, nestedOperatorsBasePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunEnumThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("nestedassignment.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunUnionThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("union.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunAssignInConditionThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("assign_in_condition.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunAssignWithIncrementThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("assign_with_increment.c"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,31 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2016 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| 
 |  | ||||||
| public class OffsetOfExprTest { |  | ||||||
|   String FILE = "infer/tests/codetoanalyze/c/frontend/offsetof_expr/offsetof_expr.c"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void frontendTest() throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, FILE); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,36 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class PrototypeTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnC_prototypeThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = |  | ||||||
|         "infer/tests/codetoanalyze/" + |  | ||||||
|             "c/frontend/c_prototype/prototype.c"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,32 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class SwitchStmtTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunSwitchStmtThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = "infer/tests/codetoanalyze/c/frontend/switchstmt/switch.c"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,33 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| import utils.InferRunner; |  | ||||||
| 
 |  | ||||||
| public class TypesTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunStructThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = "infer/tests/codetoanalyze/c/frontend/types/struct.c"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,32 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class UnusualExprTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunEnumThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = "infer/tests/codetoanalyze/c/frontend/unusual_exps/generic_exp.c"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,39 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class UnusualStmtsTest { |  | ||||||
| 
 |  | ||||||
|   String boolBasePath = "infer/tests/codetoanalyze/c/frontend/unusual_stmts/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, boolBasePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunCommaThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("asm.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,31 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2016 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.c; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| 
 |  | ||||||
| public class VAArgExprTest { |  | ||||||
|   String FILE = "infer/tests/codetoanalyze/c/frontend/vaarg_expr/vaarg_expr.c"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void frontendTest() throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCDotFiles(folder, FILE); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,43 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2015 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class AttributesTest { |  | ||||||
| 
 |  | ||||||
|   String basePath = "infer/tests/codetoanalyze/cpp/frontend/attributes/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, basePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testClangFallthroughDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("clang_fallthrough.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|     @Test |  | ||||||
|     public void testDeprecatedHackDotFilesMatch() |  | ||||||
|         throws InterruptedException, IOException, InferException { |  | ||||||
|       frontendTest("deprecated_hack.cpp"); |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,33 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class CastsTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunCommaThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = |  | ||||||
|         "infer/tests/codetoanalyze/cpp/frontend/types/casts.cpp"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,41 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class ClassTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunCommaThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = |  | ||||||
|         "infer/tests/codetoanalyze/cpp/frontend/types/struct.cpp"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunStructForwardDeclareThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = |  | ||||||
|         "infer/tests/codetoanalyze/cpp/frontend/types/struct_forward_declare.cpp"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,43 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class ConditionalTest { |  | ||||||
| 
 |  | ||||||
|   String basePath = "infer/tests/codetoanalyze/cpp/frontend/conditional/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, basePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testInlineMethodDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("lvalue_conditional.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testBinaryConditionalDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("binary_conditional.cpp"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,91 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class ConstructorsTest { |  | ||||||
| 
 |  | ||||||
|   String basePath = "infer/tests/codetoanalyze/cpp/frontend/constructors/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, basePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testConstructorWithBodyDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("constructor_with_body.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testConstructorDefaultArgDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("constructor_default_arg.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testTempObjectDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("temp_object.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testConstructorInitDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("constructor_init.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testCopyMoveConstructorDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("copy_move_constructor.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testDefaultFieldInitDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("default_field_init.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testConstructorInitListDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("constructor_struct_init_list.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testStdInitListDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("std_init_list.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testConstructorNewFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("constructor_new.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testConstructorArrayFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("constructor_array.cpp"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,55 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class DestructorsTest { |  | ||||||
| 
 |  | ||||||
|   String basePath = "infer/tests/codetoanalyze/cpp/frontend/destructors/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, basePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testSimpleDeclDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("simple_decl.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testCallOnDeleteDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("call_on_delete.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testCallOnPseudoDestructorExprDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("pseudo_destructor_expr.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testCallOnCallDestructorDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("call_destructor.cpp"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,44 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class ExceptionsTest { |  | ||||||
| 
 |  | ||||||
|   String basePath = "infer/tests/codetoanalyze/cpp/frontend/exceptions/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, basePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testSimpleDeclDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("Exceptions.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testNoExceptionExprDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("noexception.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,32 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| public class ForRangeLoopTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunOnForEach1ThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = |  | ||||||
|         "infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,50 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class FunctionsTest { |  | ||||||
| 
 |  | ||||||
|   String basePath = "infer/tests/codetoanalyze/cpp/frontend/types/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, basePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunCommaThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("functions.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testOperatorDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("operator_overload.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testReturnStructDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("return_struct.cpp"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,33 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2016 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| 
 |  | ||||||
| public class GlobalConstTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunCommaThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = |  | ||||||
|         "infer/tests/codetoanalyze/cpp/frontend/global_const/global_const1.cpp"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,33 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2016 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| 
 |  | ||||||
| public class GlobalConstTest2 { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunCommaThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = |  | ||||||
|         "infer/tests/codetoanalyze/cpp/frontend/global_const/global_const2.cpp"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,44 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2016 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class IncludeHeaderTest { |  | ||||||
| 
 |  | ||||||
|   String basePath = "infer/tests/codetoanalyze/cpp/frontend/include_header/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFilesIncludeHeaders(folder, basePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testIncludeOnlyDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("include_only.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testIncludeTemplDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("include_templ.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,44 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class InheritanceTest { |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   String basePath = "infer/tests/codetoanalyze/cpp/frontend/types/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, basePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testInheritanceDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("inheritance.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testInheritanceFieldDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("inheritance_field.cpp"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,41 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class LiteralsTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunNullptrThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = |  | ||||||
|         "infer/tests/codetoanalyze/cpp/frontend/literals/nullptr.cpp"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunScalarValueInitThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = |  | ||||||
|         "infer/tests/codetoanalyze/cpp/frontend/literals/scalar_value_init.cpp"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,79 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class MethodsTest { |  | ||||||
| 
 |  | ||||||
|   String methodBasePath = "infer/tests/codetoanalyze/cpp/frontend/methods/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, methodBasePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testInlineMethodDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("inline_method.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testDefaultParametersDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("default_parameters.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testOverloadingDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("overloading.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testDerefernceThisDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("dereference_this.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testStaticDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("static.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testReturnStructDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("return_struct.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testConversionOperatorDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("conversion_operator.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testVirtualMethodsDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("virtual_methods.cpp"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,41 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2016 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| 
 |  | ||||||
| public class NPETest { |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   String methodBasePath = "infer/tests/codetoanalyze/cpp/errors/npe/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, methodBasePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testInlineMethodDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("method_call.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,48 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class NamespaceTest { |  | ||||||
|   String basePath = "infer/tests/codetoanalyze/cpp/frontend/namespace/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, basePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testNamespaceDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("namespace.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testFunctionDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("function.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testGlobalVariableDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("global_variable.cpp"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,56 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class NestedCPPOperatorsTest { |  | ||||||
| 
 |  | ||||||
|   String nestedOperatorsBasePath = "infer/tests/codetoanalyze/cpp/frontend/nestedoperators/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, nestedOperatorsBasePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testVarDeclInsideIfDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("var_decl_inside_if.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testVarDeclInsideWhileDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("var_decl_inside_while.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testVarDeclInsideForDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("var_decl_inside_for.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testVarDeclInsideSwitchDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("var_decl_inside_switch.cpp"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,66 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  *  Run C++ frontend on C code and compare it to .dot files produced by C frontend. |  | ||||||
|  */ |  | ||||||
| public class NestedOperatorsTest { |  | ||||||
| 
 |  | ||||||
|   String nestedOperatorsBasePath = "infer/tests/codetoanalyze/c/frontend/nestedoperators/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, nestedOperatorsBasePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunEnumThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("nestedassignment.c"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunUnionThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     // .dot file for cpp is different due to autogenerated constructors for union type
 |  | ||||||
|     // otherwise cfgs should look the same for C and C++
 |  | ||||||
|     frontendTest("union.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunAssignInConditionThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     // .dot file for cpp is slightly different (but semantically equivalent).
 |  | ||||||
|     // We need to have different dot file to compare against.
 |  | ||||||
|     // assign_in_condition.cpp is in fact pointing to assign_in_condition.c
 |  | ||||||
|     frontendTest("assign_in_condition.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunAssignWithIncrementThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     // .dot file differs, but it's semantically equivalent to one produced by
 |  | ||||||
|     // C compiler
 |  | ||||||
|     frontendTest("assign_with_increment.cpp"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,33 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class NewTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunCommaThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = |  | ||||||
|         "infer/tests/codetoanalyze/cpp/frontend/builtin/new.cpp"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,98 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2015 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class ReferenceTest { |  | ||||||
| 
 |  | ||||||
|   String basePath = "infer/tests/codetoanalyze/cpp/frontend/reference/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, basePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testBoxDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("box.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testUnboxDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("unbox.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testInitDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("init.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testMemberAccessDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("member_access.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testMemberAccessFromReturnDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("member_access_from_return.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testNestedAssignmentDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("nested_assignment.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testIncrementDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("increment.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testTemporaryLValueDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("temporary_lvalue.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testReferenceTypeE2EDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("reference_type_e2e.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testReferenceStructE2EDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("reference_struct_e2e.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testReferenceFieldDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("reference_field.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,33 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class SelfParameterTest { |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void whenCaptureRunCommaThenDotFilesAreTheSame() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     String src = |  | ||||||
|         "infer/tests/codetoanalyze/cpp/frontend/keywords/self_parameter.cpp"; |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, src); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,37 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class SubtypingTest { |  | ||||||
| 
 |  | ||||||
|   String basePath = "infer/tests/codetoanalyze/cpp/errors/subtyping/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, basePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testSimpleDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("cast_with_enforce.cpp"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,68 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class TemplatesTest { |  | ||||||
| 
 |  | ||||||
|   String basePath = "infer/tests/codetoanalyze/cpp/frontend/templates/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, basePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testSimpleDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("simple.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testClassTemplateInstantiateDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("class_template_instantiate.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testFunctionDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("function.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testMethodDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("method.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testSizeofPackDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("sizeof_pack.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void testFunctionPackDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("function_pack.cpp"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,49 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Copyright (c) 2013 - present Facebook, Inc. |  | ||||||
|  * All rights reserved. |  | ||||||
|  * |  | ||||||
|  * This source code is licensed under the BSD style license found in the |  | ||||||
|  * LICENSE file in the root directory of this source tree. An additional grant |  | ||||||
|  * of patent rights can be found in the PATENTS file in the same directory. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package frontend.cpp; |  | ||||||
| 
 |  | ||||||
| import org.junit.Rule; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| import java.io.IOException; |  | ||||||
| 
 |  | ||||||
| import utils.DebuggableTemporaryFolder; |  | ||||||
| import utils.InferException; |  | ||||||
| import utils.ClangFrontendUtils; |  | ||||||
| 
 |  | ||||||
| public class TypesTest { |  | ||||||
| 
 |  | ||||||
|   String basePath = "infer/tests/codetoanalyze/cpp/frontend/types/"; |  | ||||||
| 
 |  | ||||||
|   @Rule |  | ||||||
|   public DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder(); |  | ||||||
| 
 |  | ||||||
|   void frontendTest(String fileRelative) throws InterruptedException, IOException, InferException { |  | ||||||
|     ClangFrontendUtils.createAndCompareCppDotFiles(folder, basePath + fileRelative); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void typeidExprDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("typeid_expr.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void structPassByValueDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("struct_pass_by_value.cpp"); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   @Test |  | ||||||
|   public void typeTraitExprDotFilesMatch() |  | ||||||
|       throws InterruptedException, IOException, InferException { |  | ||||||
|     frontendTest("type_trait_expr.cpp"); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
					Loading…
					
					
				
		Reference in new issue