Major update of facebook-clang-plugins

Summary: public
Update facebook-clang-plugins. Changes:
- [major] new clang
- dump class template instantiations
- change naming for qual names of anonymous structs

Changes are due to:
1. Different setter properties are exported for defaults (more correct). Fix the test that was wrong
2. New unary operator type
3. Naming for qual names changed

Reviewed By: jvillard

Differential Revision: D2685734

fb-gh-sync-id: f2c568a
master
Andrzej Kotulski 9 years ago committed by facebook-github-bot-1
parent 8eb668f668
commit 04e4546a91

@ -1 +1 @@
Subproject commit edbf73fd3e9d455b7f1972369eaf01431b29bba7 Subproject commit 8ae673bc2714af3d8b377676f22b8ba1bc91073b

@ -178,7 +178,7 @@ let unary_operation_instruction uoi e typ loc =
(* Actual dereferencing is handled by implicit cast from rvalue to lvalue *) (* Actual dereferencing is handled by implicit cast from rvalue to lvalue *)
([], e, []) ([], e, [])
| `AddrOf -> ([], e, []) | `AddrOf -> ([], e, [])
| `Real | `Imag | `Extension -> | `Real | `Imag | `Extension | `Coawait ->
Printing.log_stats Printing.log_stats
"\nWARNING: Missing translation for Unary Operator Kind %s. The construct has been ignored...\n" uok; "\nWARNING: Missing translation for Unary Operator Kind %s. The construct has been ignored...\n" uok;
([], e, []) ([], e, [])

@ -123,6 +123,7 @@ struct
| `Real -> "Real" | `Real -> "Real"
| `Imag -> "Imag" | `Imag -> "Imag"
| `Extension -> "Extension" | `Extension -> "Extension"
| `Coawait -> "Coawait"
let string_of_stmt stmt = let string_of_stmt stmt =
let name = Clang_ast_proj.get_stmt_kind_string stmt in let name = Clang_ast_proj.get_stmt_kind_string stmt in

@ -79,7 +79,7 @@ struct
let need_unary_op_node uoi = let need_unary_op_node uoi =
match uoi.Clang_ast_t.uoi_kind with match uoi.Clang_ast_t.uoi_kind with
| `PostInc | `PostDec | `PreInc | `PreDec | `AddrOf | `Deref | `Plus -> true | `PostInc | `PostDec | `PreInc | `PreDec | `AddrOf | `Deref | `Plus -> true
| `Minus | `Not | `LNot | `Real | `Imag | `Extension -> false | `Minus | `Not | `LNot | `Real | `Imag | `Extension | `Coawait -> false
end end

@ -1,5 +1,5 @@
digraph iCFG { digraph iCFG {
7 [label="7: BinaryOperatorStmt: Assign \n n$3=*&#GB$x:struct anonymous_record_in_infer_tests_codetoanalyze_c_frontend_nestedoperators_union.c:12:1 * [line 27]\n *n$3.a:int =1 [line 27]\n REMOVE_TEMPS(n$3); [line 27]\n " shape="box"] 7 [label="7: BinaryOperatorStmt: Assign \n n$3=*&#GB$x:struct (anonymous struct at infer_tests_codetoanalyze_c_frontend_nestedoperators_union.c:12:1) * [line 27]\n *n$3.a:int =1 [line 27]\n REMOVE_TEMPS(n$3); [line 27]\n " shape="box"]
7 -> 6 ; 7 -> 6 ;
@ -11,7 +11,7 @@ digraph iCFG {
5 -> 4 ; 5 -> 4 ;
4 [label="4: BinaryOperatorStmt: Assign \n n$0=*&#GB$x:struct anonymous_record_in_infer_tests_codetoanalyze_c_frontend_nestedoperators_union.c:12:1 * [line 31]\n n$1=*n$0.b:int [line 31]\n *&#GB$y.g.w:int =n$1 [line 31]\n REMOVE_TEMPS(n$0,n$1); [line 31]\n " shape="box"] 4 [label="4: BinaryOperatorStmt: Assign \n n$0=*&#GB$x:struct (anonymous struct at infer_tests_codetoanalyze_c_frontend_nestedoperators_union.c:12:1) * [line 31]\n n$1=*n$0.b:int [line 31]\n *&#GB$y.g.w:int =n$1 [line 31]\n REMOVE_TEMPS(n$0,n$1); [line 31]\n " shape="box"]
4 -> 3 ; 4 -> 3 ;

@ -1,5 +1,5 @@
digraph iCFG { digraph iCFG {
9 [label="9: BinaryOperatorStmt: Assign \n n$3=*&#GB$x:struct anonymous_record_in_infer_tests_codetoanalyze_c_frontend_nestedoperators_union.cpp:12:1 * [line 27]\n *n$3.a:int =1 [line 27]\n REMOVE_TEMPS(n$3); [line 27]\n " shape="box"] 9 [label="9: BinaryOperatorStmt: Assign \n n$3=*&#GB$x:struct (anonymous struct at infer_tests_codetoanalyze_c_frontend_nestedoperators_union.cpp:12:1) * [line 27]\n *n$3.a:int =1 [line 27]\n REMOVE_TEMPS(n$3); [line 27]\n " shape="box"]
9 -> 8 ; 9 -> 8 ;
@ -11,7 +11,7 @@ digraph iCFG {
7 -> 6 ; 7 -> 6 ;
6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&#GB$x:struct anonymous_record_in_infer_tests_codetoanalyze_c_frontend_nestedoperators_union.cpp:12:1 * [line 31]\n n$1=*n$0.b:int [line 31]\n *&#GB$y.g.w:int =n$1 [line 31]\n REMOVE_TEMPS(n$0,n$1); [line 31]\n " shape="box"] 6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&#GB$x:struct (anonymous struct at infer_tests_codetoanalyze_c_frontend_nestedoperators_union.cpp:12:1) * [line 31]\n n$1=*n$0.b:int [line 31]\n *&#GB$y.g.w:int =n$1 [line 31]\n REMOVE_TEMPS(n$0,n$1); [line 31]\n " shape="box"]
6 -> 5 ; 6 -> 5 ;
@ -26,10 +26,10 @@ digraph iCFG {
3 -> 9 ; 3 -> 9 ;
2 [label="2: Exit anonymous_record_in_infer_tests_codetoanalyze_c_frontend_nestedoperators_union.cpp:14:1_ \n " color=yellow style=filled] 2 [label="2: Exit (anonymous union at infer_tests_codetoanalyze_c_frontend_nestedoperators_union.cpp:14:1)_ \n " color=yellow style=filled]
1 [label="1: Start anonymous_record_in_infer_tests_codetoanalyze_c_frontend_nestedoperators_union.cpp:14:1_\nFormals: this:class anonymous_record_in_infer_tests_codetoanalyze_c_frontend_nestedoperators_union.cpp:14:1 *\nLocals: \n DECLARE_LOCALS(&return); [line 14]\n NULLIFY(&this,false); [line 14]\n " color=yellow style=filled] 1 [label="1: Start (anonymous union at infer_tests_codetoanalyze_c_frontend_nestedoperators_union.cpp:14:1)_\nFormals: this:class (anonymous union at infer_tests_codetoanalyze_c_frontend_nestedoperators_union.cpp:14:1) *\nLocals: \n DECLARE_LOCALS(&return); [line 14]\n NULLIFY(&this,false); [line 14]\n " color=yellow style=filled]
1 -> 2 ; 1 -> 2 ;

@ -8,6 +8,7 @@
*/ */
#import "EOCPerson.h" #import "EOCPerson.h"
#include <stdlib.h>
int main() { int main() {
EOCPerson *person = [[EOCPerson alloc] init]; EOCPerson *person = [[EOCPerson alloc] init];

@ -1,24 +1,24 @@
digraph iCFG { digraph iCFG {
6 [label="6: DeclStmt \n n$4=_fun___objc_alloc_no_fail(sizeof(class EOCPerson ):unsigned long ) [line 13]\n n$2=_fun_EOCPerson_init(n$4:class EOCPerson *) virtual [line 13]\n *&person:class EOCPerson *=n$2 [line 13]\n REMOVE_TEMPS(n$2,n$4); [line 13]\n " shape="box"] 6 [label="6: DeclStmt \n n$4=_fun___objc_alloc_no_fail(sizeof(class EOCPerson ):unsigned long ) [line 14]\n n$2=_fun_EOCPerson_init(n$4:class EOCPerson *) virtual [line 14]\n *&person:class EOCPerson *=n$2 [line 14]\n REMOVE_TEMPS(n$2,n$4); [line 14]\n " shape="box"]
6 -> 5 ; 6 -> 5 ;
5 [label="5: Message Call: performDaysWork \n n$1=*&person:class EOCPerson * [line 14]\n _fun_EOCPerson_performDaysWork(n$1:class EOCPerson *) virtual [line 14]\n REMOVE_TEMPS(n$1); [line 14]\n NULLIFY(&person,false); [line 14]\n " shape="box"] 5 [label="5: Message Call: performDaysWork \n n$1=*&person:class EOCPerson * [line 15]\n _fun_EOCPerson_performDaysWork(n$1:class EOCPerson *) virtual [line 15]\n REMOVE_TEMPS(n$1); [line 15]\n NULLIFY(&person,false); [line 15]\n " shape="box"]
5 -> 4 ; 5 -> 4 ;
4 [label="4: DeclStmt \n n$0=_fun_malloc_no_fail(sizeof(int ):int ) [line 15]\n *&x:int *=n$0 [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&x,false); [line 15]\n " shape="box"] 4 [label="4: DeclStmt \n n$0=_fun_malloc_no_fail(sizeof(int ):int ) [line 16]\n *&x:int *=n$0 [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&x,false); [line 16]\n " shape="box"]
4 -> 3 ; 4 -> 3 ;
3 [label="3: Return Stmt \n *&return:int =0 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 3 [label="3: Return Stmt \n *&return:int =0 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
3 -> 2 ; 3 -> 2 ;
2 [label="2: Exit main \n " color=yellow style=filled] 2 [label="2: Exit main \n " color=yellow style=filled]
1 [label="1: Start main\nFormals: \nLocals: x:int * person:class EOCPerson * \n DECLARE_LOCALS(&return,&x,&person); [line 12]\n NULLIFY(&person,false); [line 12]\n NULLIFY(&x,false); [line 12]\n " color=yellow style=filled] 1 [label="1: Start main\nFormals: \nLocals: x:int * person:class EOCPerson * \n DECLARE_LOCALS(&return,&x,&person); [line 13]\n NULLIFY(&person,false); [line 13]\n NULLIFY(&x,false); [line 13]\n " color=yellow style=filled]
1 -> 6 ; 1 -> 6 ;

@ -1,4 +1,12 @@
digraph iCFG { digraph iCFG {
16 [label="16: Message Call: retain \n n$17=*&son:class A * [line 16]\n n$16=_fun___objc_retain(n$17:class A *) [line 16]\n REMOVE_TEMPS(n$16,n$17); [line 16]\n " shape="box"]
16 -> 15 ;
15 [label="15: Message Call: release \n n$14=*&self:class A * [line 16]\n n$15=*n$14._son:class A * [line 16]\n n$13=_fun___objc_release(n$15:class A *) [line 16]\n REMOVE_TEMPS(n$13,n$14,n$15); [line 16]\n " shape="box"]
15 -> 14 ;
14 [label="14: BinaryOperatorStmt: Assign \n n$10=*&self:class A * [line 16]\n n$11=*&son:class A * [line 16]\n _fun___objc_retain(n$11:class A *) [line 16]\n n$12=*n$10._son:class A * [line 16]\n *n$10._son:class A *=n$11 [line 16]\n _fun___objc_release(n$12:class A *) [line 16]\n REMOVE_TEMPS(n$10,n$11,n$12); [line 16]\n NULLIFY(&self,false); [line 16]\n NULLIFY(&son,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 14 [label="14: BinaryOperatorStmt: Assign \n n$10=*&self:class A * [line 16]\n n$11=*&son:class A * [line 16]\n _fun___objc_retain(n$11:class A *) [line 16]\n n$12=*n$10._son:class A * [line 16]\n *n$10._son:class A *=n$11 [line 16]\n _fun___objc_release(n$12:class A *) [line 16]\n REMOVE_TEMPS(n$10,n$11,n$12); [line 16]\n NULLIFY(&self,false); [line 16]\n NULLIFY(&son,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"]
@ -9,7 +17,7 @@ digraph iCFG {
12 [label="12: Start A_setSon: (generated)\nFormals: self:class A * son:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled] 12 [label="12: Start A_setSon: (generated)\nFormals: self:class A * son:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled]
12 -> 14 ; 12 -> 16 ;
11 [label="11: Return Stmt \n n$7=*&self:class A * [line 16]\n n$8=*n$7._son:class A * [line 16]\n *&return:class A *=n$8 [line 16]\n n$9=_fun___set_autorelease_attribute(n$8:class A *) [line 16]\n REMOVE_TEMPS(n$7,n$8,n$9); [line 16]\n NULLIFY(&self,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 11 [label="11: Return Stmt \n n$7=*&self:class A * [line 16]\n n$8=*n$7._son:class A * [line 16]\n *&return:class A *=n$8 [line 16]\n n$9=_fun___set_autorelease_attribute(n$8:class A *) [line 16]\n REMOVE_TEMPS(n$7,n$8,n$9); [line 16]\n NULLIFY(&self,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"]

@ -36,7 +36,7 @@
@interface BBAssign : NSObject @interface BBAssign : NSObject
@property (nonatomic) AA* a; @property (nonatomic, assign) AA* a;
@end @end
int strongcycle() { int strongcycle() {

@ -8,7 +8,7 @@
*/ */
#include "MethodCall.h" #include "MethodCall.h"
#include <stdlib.h>
int main() { int main() {
MethodCall *call = [MethodCall alloc]; MethodCall *call = [MethodCall alloc];

@ -8,6 +8,7 @@
*/ */
#include "IvarExample.h" #include "IvarExample.h"
#include <stdlib.h>
int main() { int main() {
IvarExample *i = [IvarExample alloc]; IvarExample *i = [IvarExample alloc];

Loading…
Cancel
Save