[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt
    Aaron Ballman via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Sep  9 10:00:58 PDT 2020
    
    
  
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM aside from a commenting nit. Thank you for the work on this!
================
Comment at: clang/include/clang/AST/Stmt.h:1180
+
+  /// \returns the likelihood of the branches of an if statement.
+  static Likelihood getLikelihood(const Stmt *Then, const Stmt *Else);
----------------
This only returns one value, so it can't return the likelihood of "the branches". How about something along the lines of:
`returns the likelihood of the 'then' branch of an 'if' statement. The 'else' branch is required to determine whether both branches specify the same likelihood, which impacts the result.`
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85091/new/
https://reviews.llvm.org/D85091
    
    
More information about the llvm-commits
mailing list