[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-06-04 Thread Tyker via Phabricator via cfe-commits
Tyker reclaimed this revision. Tyker added a comment. I closed it originally because it was inactive and i was working on other reviews. but i learned this is not how it is supposed to be done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59467/new/ https://reviews.llvm.org/D59467

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-05-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. The `ASTImporter.cpp` looks good to me. (Becasue the `BranchHint` is a simple an enum, so we don't need to specifically import that as we would in case of e.g. an `Expr`.) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59467/new/ https://reviews.llvm.org/D59467

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-04-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/CFG.cpp:2208 +} + CFGBlock *CFGBuilder::VisitStmt(Stmt *S, AddStmtChoice asc) { Tyker wrote: > NoQ wrote: > > Tyker wrote: > > > NoQ wrote: > > > > Tyker wrote: > > > > > riccibruno wrote: > > > > > > I d

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-04-02 Thread Gauthier via Phabricator via cfe-commits
Tyker updated this revision to Diff 193284. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59467/new/ https://reviews.llvm.org/D59467 Files: clang/include/clang/AST/Stmt.h clang/include/clang/AST/StmtCXX.h clang/include/clang/AST/TextNodeDumper.h clang/include/clang/Basic/Attr.td

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-04-02 Thread Gauthier via Phabricator via cfe-commits
Tyker updated this revision to Diff 193269. Tyker added a comment. fixed the CFG issue is an proper way CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59467/new/ https://reviews.llvm.org/D59467 Files: clang/include/clang/AST/Stmt.h clang/include/clang/AST/StmtCXX.h clang/include/c

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-04-02 Thread Gauthier via Phabricator via cfe-commits
Tyker marked an inline comment as done. Tyker added inline comments. Comment at: clang/lib/Analysis/CFG.cpp:2208 +} + CFGBlock *CFGBuilder::VisitStmt(Stmt *S, AddStmtChoice asc) { NoQ wrote: > Tyker wrote: > > NoQ wrote: > > > Tyker wrote: > > > > riccibruno wro

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-04-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/CFG.cpp:2208 +} + CFGBlock *CFGBuilder::VisitStmt(Stmt *S, AddStmtChoice asc) { Tyker wrote: > NoQ wrote: > > Tyker wrote: > > > riccibruno wrote: > > > > I don't understand why this is needed. Can you ex

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-04-01 Thread Gauthier via Phabricator via cfe-commits
Tyker marked an inline comment as done. Tyker added inline comments. Comment at: clang/lib/Analysis/CFG.cpp:2208 +} + CFGBlock *CFGBuilder::VisitStmt(Stmt *S, AddStmtChoice asc) { NoQ wrote: > Tyker wrote: > > riccibruno wrote: > > > I don't understand why this

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-03-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/CFG.cpp:2208 +} + CFGBlock *CFGBuilder::VisitStmt(Stmt *S, AddStmtChoice asc) { Tyker wrote: > riccibruno wrote: > > I don't understand why this is needed. Can you explain it ? Also I think > > that some

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-03-31 Thread Gauthier via Phabricator via cfe-commits
Tyker updated this revision to Diff 193016. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59467/new/ https://reviews.llvm.org/D59467 Files: clang/include/clang/AST/Stmt.h clang/include/clang/AST/StmtCXX.h clang/include/clang/AST/TextNodeDumper.h clang/include/clang/Basic/Attr.td

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-03-31 Thread Gauthier via Phabricator via cfe-commits
Tyker marked an inline comment as done. Tyker added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:528 +if (ElseLikelihoodAttr && ThenLikelihoodAttr->isEqual(ElseLikelihoodAttr)) { + Diag(ElseLikelihoodAttr->getLocation(), + diag::warn_conflicting_li

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-03-31 Thread Gauthier via Phabricator via cfe-commits
Tyker marked an inline comment as done. Tyker added inline comments. Herald added a subscriber: rnkovacs. Comment at: clang/test/SemaCXX/cxx2a-likelihood-attr.cpp:70 + +// clang-format off just saw the //clang format off at the bottom ill remove it CHANGES SINC

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-03-31 Thread Gauthier via Phabricator via cfe-commits
Tyker updated this revision to Diff 193015. Tyker added a comment. Herald added a reviewer: martong. Herald added a reviewer: shafik. @riccibruno i fixed based on feedback everything except the CFG edit as i still need to analyse the situation. added AST and CodeGen for For, While, Do and CXXFor

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-03-31 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:705 +} + void CodeGenFunction::EmitWhileStmt(const WhileStmt &S, Tyker wrote: > riccibruno wrote: > > I believe that the lowering is incorrect. I applied your patch and here > > ({F85718

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-03-31 Thread Gauthier via Phabricator via cfe-commits
Tyker marked 2 inline comments as done. Tyker added inline comments. Comment at: clang/lib/Analysis/CFG.cpp:2208 +} + CFGBlock *CFGBuilder::VisitStmt(Stmt *S, AddStmtChoice asc) { riccibruno wrote: > I don't understand why this is needed. Can you explain it ? Al

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-03-30 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a subscriber: NoQ. riccibruno added a comment. It seems that the tests are not present in this diff ? Also, again, could you please: 1. Use `clang-format`, and 2. Make sure that the comments are full sentences with appropriate punctuation, and 3. Follow the style guide regardin

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-03-30 Thread Gauthier via Phabricator via cfe-commits
Tyker updated this revision to Diff 192979. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59467/new/ https://reviews.llvm.org/D59467 Files: clang/include/clang/AST/Stmt.h clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/include/clang/Basic/DiagnosticS

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-03-29 Thread Gauthier via Phabricator via cfe-commits
Tyker updated this revision to Diff 192811. Tyker retitled this revision from "[clang] Adding the Likely Attribute from C++2a to AST" to "[clang] Adding the Likelihood Attribute from C++2a". Tyker added a comment. @aaron.ballman fixed based on feedback. added semantic support for switch statment.