NoQ added a comment.

I don't know much about OpenMP, but i guess i can help with the CFG a bit.

I strongly recommend adding a few direct tests for the CFG so that to check 
that the order of statements and the overall topology of the CFG is as you 
intended. Currently those tests are routed through the Static Analyzer because 
nobody else seems to care; see `test/Analysis/cfg.cpp` as an example (there are 
a few more such tests, grep for `DumpCFG`).

I tried to apply the patch and accidentally noticed that none of the newly 
added tests actually pass for me. Is this the right patch? Or is it just me?



================
Comment at: lib/Analysis/CFG.cpp:4746-4750
+  D->for_each_used_expr([this, &B](Expr *E) {
+    assert(E && "Expected expression.");
+    if (CFGBlock *R = Visit(E))
+      B = R;
+  });
----------------
Not sure, are these expressions actually evaluated in run-time when the 
directive is hit? When i looked at a few AST dumps it seemed to me as if these 
are just a few `DeclRefExpr`s that refer back to the captured variables; they 
don't really do anything.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64356/new/

https://reviews.llvm.org/D64356



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to